Open zhenhxiaobin0210 opened 4 years ago
Can you give me some examples, thank you
Hi! Sorry for the late reply!
question: (1) Generate a new folder in the compressed file;
Generating an empty folder inside a compressed file is not possible, at the moment.
(2) Compress the file to the (1) folder.
However, you can achieve your goal by using the method
void BitCompressor::compress( const map< wstring, wstring >& in_paths, const wstring& out_file ) const;
which allows to compress files while giving them a new alias. In particular, you could use it as follows:
std::map< std::wstring, std::wstring > file_map = {
{ L"path/to/file.ext", L"new_folder/file.ext" }
};
compressor.compress( file_map, out_file );
In this way, the compressed file will appear inside a folder called new_folder
in the output archive.
Thank you very much for your reply! Now I want to update some of the files in the compressed file. If there is already a“ xx.dat ”How do I overwrite this file. If I use this function“ compressor.setUpdateMode (true) "will generate two files with the same name in the compressed file“ xx.dat " But actually I want to overwrite the original file with the same name. thank you!
question: (1) Generate a new folder in the compressed file;
(2) Compress the file to the (1) folder.