Function compress

Summary

#include <include/bitcompressor.hpp>

(1) void compress(const vector< wstring > &in_paths, const wstring &out_archive) const

(2) void compress(const map< wstring, wstring > &in_paths, const wstring &out_archive) const

(3) void compress(const vector< wstring > &in_paths, ostream &out_stream) const

(4) void compress(const map< wstring, wstring > &in_paths, ostream &out_stream) const

Function overload

Synopsis

#include <include/bitcompressor.hpp>

void compress(const vector< wstring > &in_paths, const wstring &out_archive) const

Description

Compresses the given files or directories.

Compression from file system to file system The items in the first argument must be the relative or absolute paths to files or directories existing on the filesystem.

Parameters

in_paths - a vector of paths.

out_archive - the path (relative or absolute) to the output archive file.

from filesystem to filesystem

Source

Lines 36-42 in src/bitcompressor.cpp. Line 73 in include/bitcompressor.hpp.

void BitCompressor::compress( const vector< wstring >& in_paths, const wstring& out_file ) const {
    if ( in_paths.size() > 1 && !mFormat.hasFeature( MULTIPLE_FILES ) ) {
        throw BitException( kUnsupportedOperation, ERROR_NOT_SUPPORTED );
    }
    vector< FSItem > fs_items = FSIndexer::indexPaths( in_paths );
    compressOut( fs_items, out_file );
}

Synopsis

#include <include/bitcompressor.hpp>

void compress(const map< wstring, wstring > &in_paths, const wstring &out_archive) const

Description

Compresses the given files or directories using the specified aliases.

The items in the first argument must be the relative or absolute paths to files or directories existing on the filesystem. Each pair of the map must follow the following format: {L"path to file in the filesystem", L"alias path in the archive"}.

Parameters

in_paths - a map of paths and corresponding aliases.

out_archive - the path (relative or absolute) to the output archive file.

Source

Lines 44-50 in src/bitcompressor.cpp. Line 86 in include/bitcompressor.hpp.

void BitCompressor::compress( const map< wstring, wstring >& in_paths, const wstring& out_file ) const {
    if ( in_paths.size() > 1 && !mFormat.hasFeature( MULTIPLE_FILES ) ) {
        throw BitException( kUnsupportedOperation, ERROR_NOT_SUPPORTED );
    }
    vector< FSItem > fs_items = FSIndexer::indexPathsMap( in_paths );
    compressOut( fs_items, out_file );
}

Synopsis

#include <include/bitcompressor.hpp>

void compress(const vector< wstring > &in_paths, ostream &out_stream) const

Description

Compresses the given files or directories.

Compression from file system to standard stream The items in the first argument must be the relative or absolute paths to files or directories existing on the filesystem.

Parameters

in_paths - a vector of paths.

out_stream - the standard ostream where the archive will be output.

from filesystem to stream

Source

Lines 100-106 in src/bitcompressor.cpp. Line 152 in include/bitcompressor.hpp.

void BitCompressor::compress( const vector< wstring >& in_paths, ostream& out_stream ) const {
    if ( in_paths.size() > 1 && !mFormat.hasFeature( MULTIPLE_FILES ) ) {
        throw BitException( kUnsupportedOperation, ERROR_NOT_SUPPORTED );
    }
    vector< FSItem > fs_items = FSIndexer::indexPaths( in_paths );
    compressOut( fs_items, out_stream );
}

Synopsis

#include <include/bitcompressor.hpp>

void compress(const map< wstring, wstring > &in_paths, ostream &out_stream) const

Description

Compresses the given files or directories using the specified aliases.

The items in the first argument must be the relative or absolute paths to files or directories existing on the filesystem. Each pair of the map must follow the following format: {L"path to file in the filesystem", L"alias path in the archive"}.

Parameters

in_paths - a map of paths and corresponding aliases.

out_stream - the standard ostream where to output the archive file.

Source

Lines 108-114 in src/bitcompressor.cpp. Line 165 in include/bitcompressor.hpp.

void BitCompressor::compress( const map< wstring, wstring >& in_paths, ostream& out_stream ) const {
    if ( in_paths.size() > 1 && !mFormat.hasFeature( MULTIPLE_FILES ) ) {
        throw BitException( kUnsupportedOperation, ERROR_NOT_SUPPORTED );
    }
    vector< FSItem > fs_items = FSIndexer::indexPathsMap( in_paths );
    compressOut( fs_items, out_stream );
}





Add Discussion as Guest

Log in