Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
runlengthcodec.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
13
#include "
core/types.h
"
14
15
//------------------------------------------------------------------------------
16
namespace
Util
17
{
18
class
RunLengthCodec
19
{
20
public
:
22
static
SizeT
GetSafeRLEBufferSize
(
SizeT
srcBufferSize);
24
static
SizeT
ComputeDecodedSize
(
const
uchar
* srcPtr,
SizeT
srcNumBytes);
26
static
SizeT
Encode
(
const
uchar
* srcPtr,
SizeT
srcNumBytes,
uchar
* dstPtr,
SizeT
dstNumBytes);
28
static
SizeT
Decode
(
const
uchar
* srcPtr,
SizeT
srcNumBytes,
uchar
* dstPtr,
SizeT
dstNumBytes);
29
};
30
31
}
// namespace Util
32
//------------------------------------------------------------------------------
Util::RunLengthCodec
A simple byte-based runlength encoder/decoder.
Definition
runlengthcodec.h:19
Util::RunLengthCodec::Encode
static SizeT Encode(const uchar *srcPtr, SizeT srcNumBytes, uchar *dstPtr, SizeT dstNumBytes)
encode byte buffer to RLE stream, returns size of RLE stream
Definition
runlengthcodec.cc:28
Util::RunLengthCodec::Decode
static SizeT Decode(const uchar *srcPtr, SizeT srcNumBytes, uchar *dstPtr, SizeT dstNumBytes)
decode RLE stream to byte buffer
Definition
runlengthcodec.cc:74
Util::RunLengthCodec::ComputeDecodedSize
static SizeT ComputeDecodedSize(const uchar *srcPtr, SizeT srcNumBytes)
compute the decoded byte size from an RLE encoded stream
Definition
runlengthcodec.cc:57
Util::RunLengthCodec::GetSafeRLEBufferSize
static SizeT GetSafeRLEBufferSize(SizeT srcBufferSize)
get a safe size for the destination buffer
Definition
runlengthcodec.cc:19
Util
A quad tree designed to return regions of free 2D space.
Definition
String.cs:6
types.h
uchar
unsigned char uchar
Definition
types.h:35
SizeT
int SizeT
Definition
types.h:42
code
foundation
util
runlengthcodec.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.