claw::rle_decoder< Pattern, InputBuffer, OutputBuffer > Class Template Referenceabstract

A class to help decoding run-length encoded (RLE) streams. More...

`#include <rle_decoder.hpp>`

## Public Types

typedef Pattern | pattern_type
| The type of the patterns we will read in the input buffer.
typedef InputBuffer | input_buffer_type
| The type of the input buffer.
typedef OutputBuffer | output_buffer_type
| The type of the output buffer.

## Public Member Functions

void | decode (input_buffer_type &input, output_buffer_type &output)

## Protected Types

enum | mode { stop , raw , compressed }
| State of the decompression. More...

## Protected Member Functions

virtual void | read_mode (input_buffer_type &input, output_buffer_type &output)=0

## Protected Attributes

mode | m_mode
| Current mode of the decompression.
unsigned int | m_count
| Case of m_mode :
pattern_type | m_pattern
| The pattern to repeat.

## Detailed Description

template<typename Pattern, typename InputBuffer, typename OutputBuffer>
class claw::rle_decoder< Pattern, InputBuffer, OutputBuffer >

A class to help decoding run-length encoded (RLE) streams.

Template parameters :

- Pattern The type of the patterns in the coded stream,
- InputBuffer The type of the input buffer,
- OutputBuffer The type of the output buffer.

The Pattern and InputBuffer parameters don't have any type requirement.

The OutputBuffer type must have the following methods :

- fill( unsigned int n, Pattern pattern ), copy n times the pattern,
- copy( unsigned int n, InputBuffer input ), copy n patterns directly from the input buffer.

Author
  Julien Jorge

Definition at line 54 of file rle_decoder.hpp.

## Member Typedef Documentation

## input_buffer_type

template<typename Pattern, typename InputBuffer, typename OutputBuffer>

typedef InputBuffer claw::rle_decoder< Pattern, InputBuffer, OutputBuffer >::input_buffer_type

The type of the input buffer.

Definition at line 61 of file rle_decoder.hpp.

## output_buffer_type

template<typename Pattern, typename InputBuffer, typename OutputBuffer>

typedef OutputBuffer claw::rle_decoder< Pattern, InputBuffer, OutputBuffer >::output_buffer_type

The type of the output buffer.

Definition at line 64 of file rle_decoder.hpp.

## pattern_type

template<typename Pattern, typename InputBuffer, typename OutputBuffer>

typedef Pattern claw::rle_decoder< Pattern, InputBuffer, OutputBuffer >::pattern_type

The type of the patterns we will read in the input buffer.

Definition at line 58 of file rle_decoder.hpp.

## Member Enumeration Documentation

## mode

template<typename Pattern, typename InputBuffer, typename OutputBuffer>

enum claw::rle_decoder::mode

protected

State of the decompression.

Enumerator
stop | Stop the decoding.
raw | Next bytes represent raw data.
compressed | Next bytes represent compressed data.

Definition at line 70 of file rle_decoder.hpp.

## Member Data Documentation

## m_count

template<typename Pattern, typename InputBuffer, typename OutputBuffer>

unsigned int claw::rle_decoder< Pattern, InputBuffer, OutputBuffer >::m_count

protected

Case of m_mode :

- m_mode == raw : The number of the next raw patterns,
- m_mode == compressed : How many times the pattern is repeated.

Definition at line 101 of file rle_decoder.hpp.

## m_mode

template<typename Pattern, typename InputBuffer, typename OutputBuffer>

mode claw::rle_decoder< Pattern, InputBuffer, OutputBuffer >::m_mode

protected

Current mode of the decompression.

Definition at line 94 of file rle_decoder.hpp.

## m_pattern

template<typename Pattern, typename InputBuffer, typename OutputBuffer>

pattern_type claw::rle_decoder< Pattern, InputBuffer, OutputBuffer >::m_pattern

protected

The pattern to repeat.

Definition at line 104 of file rle_decoder.hpp.

The documentation for this class was generated from the following file:

- rle_decoder.hpp