-
-
Notifications
You must be signed in to change notification settings - Fork 121
BitStreamExtractor
The BitStreamExtractor class allows to extract the content of in-memory archives.
#include "bitstreamextractor.hpp"
inherits from BitArchiveOpener.
Return type | Name |
---|---|
BitStreamExtractor( const Bit7zLibrary &lib, const BitInFormat &format=BitFormat::Auto ) | |
void | extract( istream &in_stream, const wstring &out_dir=L"" ) const |
void | extract( istream &in_stream, vector< byte_t > &out_buffer, unsigned int index=0 ) const |
void | extract( istream &in_stream, ostream &out_stream, unsigned int index=0 ) const |
void | extract( istream &in_stream, map< wstring, vector< byte_t > > &out_map ) const |
void | test( istream &in_stream ) const |
const BitInFormat & | format() const override |
const BitInFormat & | extractionFormat() const |
const Bit7zLibrary & | library() const |
const wstring | password() const |
bool | isPasswordDefined() const |
TotalCallback | totalCallback() const |
ProgressCallback | progressCallback() const |
RatioCallback | ratioCallback() const |
FileCallback | fileCallback() const |
PasswordCallback | passwordCallback() const |
void | setPassword( const wstring &password ) |
void | clearPassword() |
void | setTotalCallback( const TotalCallback &callback ) |
void | setProgressCallback( const ProgressCallback &callback ) |
void | setRatioCallback( const RatioCallback &callback ) |
void | setFileCallback( const FileCallback &callback ) |
void | setPasswordCallback( const PasswordCallback &callback ) |
BitStreamExtractor( const Bit7zLibrary &lib, const BitInFormat &format=BitFormat::Auto )
Constructs a BitStreamExtractor object.
The Bit7zLibrary parameter is needed in order to have access to the functionalities of the 7z DLLs. On the other hand, the BitInFormat is required in order to know the format of the input archive.
Note: When bit7z is compiled using the BIT7Z_AUTO_FORMAT macro define, the format argument has default value BitFormat::Auto (automatic format detection of the input archive). On the other hand, when BIT7Z_AUTO_FORMAT is not defined (i.e. no auto format detection available) the format argument must be specified.
Extracts the given stream archive into the choosen directory.
Extracts the given stream archive into the output buffer.
Extracts the given stream archive into the output standard stream.
Extracts the given stream archive into a map of memory buffers, where keys are the paths of the files (inside the archive) and values are the corresponding decompressed contents.
void test( istream &in_stream ) const
Tests the given stream archive without extracting its content.
If the input archive is not valid, a BitException is thrown.
[virtual] const BitInFormat & format() const override
Returns the archive format used by the archive opener.
const BitInFormat & extractionFormat() const
Returns the archive format used by the archive opener.
const Bit7zLibrary & library() const
Returns the Bit7zLibrary object used by the handler.
Returns the password used to open, extract or encrypt the archive.
Returns true if a password is defined, false otherwise.
TotalCallback totalCallback() const
Returns the current total callback.
ProgressCallback progressCallback() const
Returns the current progress callback.
RatioCallback ratioCallback() const
Returns the current ratio callback.
FileCallback fileCallback() const
Returns the current file callback.
PasswordCallback passwordCallback() const
Returns the current password callback.
[virtual] void setPassword( const wstring &password )
Sets up a password to be used by the archive handler.
The password will be used to encrypt/decrypt archives by using the default cryptographic method of the archive format.
Note: Calling setPassword when the input archive is not encrypted does not have effect on the extraction process.
Clear the current password used by the handler.
Calling clearPassword() will disable the encryption/decryption of archives.
Note: This is equivalent to calling setPassword(L"").
void setTotalCallback( const TotalCallback &callback )
Sets the callback to be called when the total size of an operation is available.
void setProgressCallback( const ProgressCallback &callback )
Sets the callback to be called when the processed size of the ongoing operation is updated.
Note: The percentage of completition of the current operation can be obtained by calculating static_cast( ( 100.0 * processed_size ) / total_size ).
void setRatioCallback( const RatioCallback &callback )
Sets the callback to be called when the input processed size and current output size of the ongoing operation are known.
Note: The ratio percentage of a compression operation can be obtained by calculating static_cast( ( 100.0 * output_size ) / input_size ).
void setFileCallback( const FileCallback &callback )
Sets the callback to be called when the currently file being processed changes.
void setPasswordCallback( const PasswordCallback &callback )
Sets the callback to be called when a password is needed to complete the ongoing operation.
Copyright © 2014 - 2024 Riccardo Ostani (@rikyoz)
- Bit7zLibrary
- BitArchiveEditor
- BitArchiveReader
- BitArchiveWriter
- BitException
- BitFileCompressor
- BitFileExtractor
- BitMemCompressor
- BitMemExtractor
- BitStreamCompressor
- BitStreamExtractor
- BitInFormat