Function compress

Summary

#include <include/bitstreamcompressor.hpp>

(1) void compress(istream &in_stream, ostream &out_stream, const wstring &in_stream_name=L"") const

(2) void compress(istream &in_stream, vector< byte_t > &out_buffer, const wstring &in_stream_name=L"") const

(3) void compress(istream &in_stream, const wstring &out_file, const wstring &in_stream_name=L"") const

Function overload

Synopsis

#include <include/bitstreamcompressor.hpp>

void compress(istream &in_stream, ostream &out_stream, const wstring &in_stream_name=L"") const

Description

Compresses the given standard istream to the standard ostream.

Parameters

in_stream - the (binary) stream to be compressed.

out_stream - the (binary) stream where the archive will be output.

in_stream_name - (optional) the name to be used for the content of the archive.

Source

Lines 35-38 in src/bitstreamcompressor.cpp. Line 32 in include/bitstreamcompressor.hpp.

void BitStreamCompressor::compress( istream& in_stream, ostream& out_stream, const wstring& in_stream_name ) const {
    CMyComPtr< UpdateCallback > update_callback = new StreamUpdateCallback( *this, in_stream, in_stream_name );
    BitArchiveCreator::compressToStream( out_stream, update_callback );
}

Synopsis

#include <include/bitstreamcompressor.hpp>

void compress(istream &in_stream, vector< byte_t > &out_buffer, const wstring &in_stream_name=L"") const

Description

Compresses the given standard istream to the output buffer.

Parameters

in_stream - the (binary) stream to be compressed.

out_buffer - the buffer going to contain the output archive.

in_stream_name - (optional) the name to be used for the content of the archive.

Source

Lines 40-43 in src/bitstreamcompressor.cpp. Line 41 in include/bitstreamcompressor.hpp.

void BitStreamCompressor::compress( istream& in_stream, vector< byte_t >& out_buffer, const wstring& in_stream_name ) const {
    CMyComPtr< UpdateCallback > update_callback = new StreamUpdateCallback( *this, in_stream, in_stream_name );
    BitArchiveCreator::compressToBuffer( out_buffer, update_callback );
}

Synopsis

#include <include/bitstreamcompressor.hpp>

void compress(istream &in_stream, const wstring &out_file, const wstring &in_stream_name=L"") const

Description

Compresses the given standard istream to an archive on the filesystem.

Parameters

in_stream - the (binary) stream to be compressed.

out_file - the output archive file path.

in_stream_name - (optional) the name to be used for the content of the archive.

Source

Lines 45-50 in src/bitstreamcompressor.cpp. Line 50 in include/bitstreamcompressor.hpp.

void BitStreamCompressor::compress( istream& in_stream, const wstring& out_file, const wstring& in_stream_name ) const {
    const wstring& name = in_stream_name.empty() ? fsutil::filename( out_file ) : in_stream_name;

    CMyComPtr< UpdateCallback > update_callback = new StreamUpdateCallback( *this, in_stream, name );
    BitArchiveCreator::compressToFile( out_file, update_callback );
}





Add Discussion as Guest

Log in