Function extract

Summary

#include <include/bitextractor.hpp>

(1) void extract(const wstring &in_file, const wstring &out_dir=L"") const

(2) void extract(const wstring &in_file, vector< byte_t > &out_buffer, unsigned int index=0) const

(3) void extract(const wstring &in_file, ostream &out_stream, unsigned int index=0) const

(4) void extract(const wstring &in_file, map< wstring, vector< byte_t > > &out_map) const

Function overload

Synopsis

#include <include/bitextractor.hpp>

void extract(const wstring &in_file, const wstring &out_dir=L"") const

Description

Extracts the given archive into the choosen directory.

Parameters

in_file - the input archive file.

out_dir - the output directory where extracted files will be put.

Source

Lines 47-50 in src/bitextractor.cpp. Line 58 in include/bitextractor.hpp.

void BitExtractor::extract( const wstring& in_file, const wstring& out_dir ) const {
    BitInputArchive in_archive( *this, in_file );
    extractToFileSystem( in_archive, in_file, out_dir, vector< uint32_t >() );
}

Synopsis

#include <include/bitextractor.hpp>

void extract(const wstring &in_file, vector< byte_t > &out_buffer, unsigned int index=0) const

Description

Extracts a file from the given archive into the output buffer.

Parameters

in_file - the input archive file.

out_buffer - the output buffer where the content of the archive will be put.

index - the index of the file to be extracted from in_file.

Source

Lines 116-119 in src/bitextractor.cpp. Line 102 in include/bitextractor.hpp.

void BitExtractor::extract( const wstring& in_file, vector< byte_t >& out_buffer, unsigned int index ) const {
    BitInputArchive in_archive( *this, in_file );
    extractToBuffer( in_archive, out_buffer, index );
}

Synopsis

#include <include/bitextractor.hpp>

void extract(const wstring &in_file, ostream &out_stream, unsigned int index=0) const

Description

Extracts a file from the given archive into the output stream.

Parameters

in_file - the input archive file.

out_stream - the (binary) stream where the content of the archive will be put.

index - the index of the file to be extracted from in_file.

Source

Lines 121-124 in src/bitextractor.cpp. Line 112 in include/bitextractor.hpp.

void BitExtractor::extract( const std::wstring& in_file, std::ostream& out_stream, unsigned int index ) const {
    BitInputArchive in_archive( *this, in_file );
    extractToStream( in_archive, out_stream, index );
}

Synopsis

#include <include/bitextractor.hpp>

void extract(const wstring &in_file, map< wstring, vector< byte_t > > &out_map) const

Description

Extracts the content of the given 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.

Parameters

in_file - the input archive file.

out_map - the output map.

Source

Lines 126-129 in src/bitextractor.cpp. Line 121 in include/bitextractor.hpp.

void BitExtractor::extract( const wstring& in_file, map< wstring, vector< byte_t > >& out_map ) const {
    BitInputArchive in_archive( *this, in_file );
    extractToBufferMap( in_archive, out_map );
}





Add Discussion as Guest

Log in