Logo Search packages:      
Sourcecode: dar version File versions

libdar::compressor Class Reference

#include <compressor.hpp>

Inheritance diagram for libdar::compressor:

libdar::generic_file

List of all members.


Detailed Description

compression class for gzip and bzip2 algorithms

Definition at line 57 of file compressor.hpp.


Public Member Functions

void change_algo (compression new_algo, U_I new_compression_level=9)
void clean_read ()
void clean_write ()
 compressor (user_interaction &dialog, compression algo, generic_file *compressed_side, U_I compression_level=9)
 compressor (user_interaction &dialog, compression algo, generic_file &compressed_side, U_I compression_level=9)
infinint copy_to (generic_file &ref, infinint size)
 copy the given amount to the object in argument
U_32 copy_to (generic_file &ref, U_32 size)
 small copy (up to 4GB) with CRC calculation
void copy_to (generic_file &ref, crc &value)
 copy all data from the current position to the object in argument and computes a CRC value of the transmitted data
void copy_to (generic_file &ref)
 copy all data from current position to the object in argument
bool diff (generic_file &f)
 compares the contents with the object in argument
void flush_read ()
void flush_write ()
compression get_algo () const
void get_crc (crc &val)
 get CRC of the transfered date since last reset
user_interactionget_gf_ui () const
 get the cached user_interaction for inherited classes in particular (this stay a public method, not a protected one)
gf_mode get_mode () const
 retreive the openning mode for this object
infinint get_position ()
 get the current read/write position
S_I read (char *a, size_t size)
 read data from the generic_file
S_I read_back (char &a)
 skip back one char, read on char and skip back one char
S_I read_forward (char &a)
 read one char
void reset_crc ()
 reset CRC on read or writen data
bool skip (const infinint &position)
 skip at the absolute position
bool skip_relative (S_I x)
 skip relatively to the current position
bool skip_to_eof ()
 skip to the end of file
S_I write (const std::string &arg)
 write a string to the generic_file
S_I write (char *a, size_t size)
 write data to the generic_file

Protected Member Functions

S_I inherited_read (char *a, size_t size)
S_I inherited_write (char *a, size_t size)
void set_mode (gf_mode x)

Private Member Functions

S_I gzip_read (char *a, size_t size)
S_I gzip_write (char *a, size_t size)
void init (compression algo, generic_file *compressed_side, U_I compression_level)
S_I none_read (char *a, size_t size)
S_I none_write (char *a, size_t size)
void terminate ()

Private Attributes

xfer * compr
generic_filecompressed
bool compressed_owner
compression current_algo
xfer * decompr
S_I(compressor::* read_ptr )(char *a, size_t size)
S_I(compressor::* write_ptr )(char *a, size_t size)

Classes

struct  xfer

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

Generated by  Doxygen 1.6.0   Back to index