claw 1.9.0
 
Loading...
Searching...
No Matches
claw::lzw_encoder< InputBuffer, OutputBuffer > Class Template Reference

A class to help encoding a stream with Lempel-Ziv-Welch (LZW) compression algorithm. More...

#include <lzw_encoder.hpp>

Public Types

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 encode (input_buffer_type &input, output_buffer_type &output) const
 

Detailed Description

template<typename InputBuffer, typename OutputBuffer>
class claw::lzw_encoder< InputBuffer, OutputBuffer >

A class to help encoding a stream with Lempel-Ziv-Welch (LZW) compression algorithm.

Template parameters:

  • InputBuffer The type of the input buffer (where we get raw data),
  • OutputBuffer The type of the output buffer (where we write compressed data).

The InputBuffer type must have the following methods:

  • bool end_of_data(), tell if the input buffer is empty,
  • unsigned int symbols_count(), get the number of different symbols in the uncompressed data,
  • unsigned int get_next(), returns an unsigned integer representing the next symbol and moves to the next symbol.

The OutputBuffer type must have the following methods:

  • unsigned int max_code(), get the highest code that the output buffer can handle,
  • write( unsigned int ), write a code in the output.
Author
Julien Jorge

Definition at line 60 of file lzw_encoder.hpp.

Member Typedef Documentation

◆ input_buffer_type

template<typename InputBuffer, typename OutputBuffer>
typedef InputBuffer claw::lzw_encoder< InputBuffer, OutputBuffer >::input_buffer_type

The type of the input buffer.

Definition at line 64 of file lzw_encoder.hpp.

◆ output_buffer_type

template<typename InputBuffer, typename OutputBuffer>
typedef OutputBuffer claw::lzw_encoder< InputBuffer, OutputBuffer >::output_buffer_type

The type of the output buffer.

Definition at line 67 of file lzw_encoder.hpp.


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