claw::rle_encoder< OutputBuffer > Class Template Reference

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

`#include <rle_encoder.hpp>`

Inheritance diagram for claw::rle_encoder< OutputBuffer >:

## Public Types

typedef OutputBuffer | output_buffer_type
| The type of the output buffer.
typedef output_buffer_type::pattern_type | pattern_type
| The type of the stored data.

## Public Member Functions

template<typename Iterator>
void | encode (Iterator first, Iterator last, output_buffer_type &output) const

## Detailed Description

template<typename OutputBuffer>
class claw::rle_encoder< OutputBuffer >

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

Template parameters :

- OutputBuffer The type of the output buffer.

The OutputBuffer type must have the following typedefs :

- pattern_type, the type of the stored data.

The OutputBuffer type must have the following methods :

- encode( unsigned int n, pattern_type pattern ), code n times the pattern ;
- template<typename Iterator> raw( Iterator first, Iterator last ) ;
- unsigned int min_interesting() returns the minimum number of time we must have the same value before compressing it ;
- unsigned int max_encodable() return the maximum number of time we can have the same value before compressing it.

Author
  Julien Jorge

Definition at line 58 of file rle_encoder.hpp.

## Member Typedef Documentation

## output_buffer_type

template<typename OutputBuffer>

typedef OutputBuffer claw::rle_encoder< OutputBuffer >::output_buffer_type

The type of the output buffer.

Definition at line 62 of file rle_encoder.hpp.

## pattern_type

template<typename OutputBuffer>

typedef output_buffer_type::pattern_type claw::rle_encoder< OutputBuffer >::pattern_type

The type of the stored data.

Definition at line 65 of file rle_encoder.hpp.

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

- rle_encoder.hpp