Home > Back-end >  Folder compression principle
Folder compression principle

Time:12-03

Recently to do folder compression programs, cross-platform, no contact before, the search on the net search, related data are basically

1 compression algorithm principle,
2 a third-party library file compression,
3 the use of compression tools available,

But can't find about the realization of the compressed folder, even could not find the library function directly compressed folder, third-party libraries interface is compressed file, (see the zlib and snappy document)

I want to ask,
1. Multistage directory folder, what is the realization of the compression process, personal guess is that the recursive traversal folder file, compression, in turn compressed file is used to record information folder name, do not know right
2. Which open source libraries provide folder directly compressed,
3. What are the books recommended by decompression document

PS: also want to know about the process about multi-threaded decompression, this will be considered the digression, out of personal interest,

CodePudding user response:

Compressed folder, slant the underlying drivers,

CodePudding user response:

All compression is based on the file, it is good to oneself traversal

CodePudding user response:

Multithreaded also can unzip, because generally a compressed file contents are continuous, find the start and end position

CodePudding user response:

Simple - Soft references 2 floor response:
all compression is based on the file, it is good to oneself traversal

Search also said a lot, but did not specify the folder structure is how to save,

CodePudding user response:

Their design is good, as long as they can restore, such as folder1 \ folder2 \ file1 file, inside a compressed file, is to save that relative path folder1 \ folder2 \ file1, decompression, is to regenerate the path

CodePudding user response:

7 z is open source, can be directly reference,
  • Related