Comments (8)
Unfortunately bit7z does not currently support this feature.
However, I expect to be able to include it in the next stable version (v4.0) which is in the works.
from bit7z.
- I adjust the BufferUpdateCallback class to support many file stream compressing,which refines the class of FileUpdateCallback. Curently it work, but I want to know, is there any problem? And would you add this kind of method?
- A fast compress method is our product urgent need, so I will also try to implement muti-threaded compressing. Would you remind me some ideas to carry out this work?
I know that there is a property of "mtf", which can set 7-zip opening muti-thread, but it is not useful when i add it in method of BitArchiveCreator::setArchiveProperties.
from bit7z.
- I adjust the BufferUpdateCallback class to support many file stream compressing,which refines the class of FileUpdateCallback.
The BufferUpdateCallback
class is meant to be used when the input is a single buffer and you want it to be compressed to a filesystem archive file, another buffer, or a standard stream.
I'm sorry, but I probably don't understand what you mean by "support many file stream compressing". Multiple buffers compressing?
Curently it work, but I want to know, is there any problem?
There is no problem, feel free to open a pull request and I'll review it asap.
And would you add this kind of method?
I still don't quite catch what functionality you're trying to add, so I'll be able tell you only when I will.
- A fast compress method is our product urgent need, so I will also try to implement muti-threaded compressing. Would you remind me some ideas to carry out this work?
I know that there is a property of "mtf", which can set 7-zip opening muti-thread, but it is not useful when i add it in method of BitArchiveCreator::setArchiveProperties.
As far as I know, the property "mtf" is useful for setting the multithreading mode only for the filters of the 7z format.
For enabling the complete multithreading mode the correct property should be "mt" (or at least this is what I understand from the command line documentation: https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm).
I didn't test this, but it is the way I would try in implementing this.
Let me know if you are successful and feel free to open a pull request, if you want!
from bit7z.
I found the reason why 7z couldn't multithread when I compressed multiple files. Just need to remove the setting of SOLID_ARCHIVE.
from bit7z.
I found the reason why 7z couldn't multithread when I compressed multiple files. Just need to remove the setting of SOLID_ARCHIVE.
Interesting: by default, the "solid archive" mode is set to false; however, if I understand correctly, 7-zip cannot exploit the multi-threading all the same, right?
Maybe explicitly specifying the "s" property disables it, or the property must be set to true to make multiple threads to work, I don't know. Anyway, I cannot remove those lines of code for obvious reasons (they are needed to support compression to solid archives).
Possibly, in the future, that "if" will check if multi-threading is requested or not, and enable/disable solid compression accordingly.
from bit7z.
Possibly, in the future, that "if" will check if multi-threading is requested or not, and enable/disable solid compression accordingly.
Please don't do that.
It should be the bit7z library user's responsibility to know what 7-Zip options work together.
If I wanted to make a solid archive, but I also specified multi-threading, I'd like to get the same behavior from the library that I would get from 7-Zip File Manager.
In my opinion, it is bad to create API whose behavior differs from the UI.
from bit7z.
Please don't do that.
It should be the bit7z library user's responsibility to know what 7-Zip options work together.
If I wanted to make a solid archive, but I also specified multi-threading, I'd like to get the same behavior from the library that I would get from 7-Zip File Manager.
In my opinion, it is bad to create API whose behavior differs from the UI.
Undoubtedly you've raised some very good points.
However, the problem here, as far as I understand it, is that whether the solid archive option is set to false or true, in all cases multi-threading is unavailable! This issue may be caused by the fact that the option for solid compression is always set explicitly, rather than only when the user set it to true (a change that I did some time ago).
At least, this is the only reason I can think of for the need of removing those lines, instead of simply call BitArchiveCreator::setSolidMode(true)
.
I haven't had a chance yet to test if this is the problem, anyway I will study the default behavior of 7-zip and try to provide a reasonable API for both multi-threading and solid compression.
from bit7z.
Implemented in v4.0.0.
from bit7z.
Related Issues (20)
- [Feature Request]: how ot set AES-128,AES-256 encrypted HOT 3
- [Bug]: Incorrect display and decompression of compressed file name HOT 4
- [Feature Request]: RenameOutput HOT 2
- [Feature Request]: custom suffix format HOT 1
- [Bug]: Issues regarding the Fat32 and Exfat file systems HOT 8
- [Bug]: Errors related to file compression HOT 4
- [Feature Request]: Can you provide a method for setting the file time HOT 1
- [build-error]: Failed to open the archive file: No such process HOT 2
- [Bug]: UpdateMode::Update not working as expected, throwing exception HOT 3
- [Feature Request]: Creation or extraction archive file in one line HOT 1
- [Feature Request]: Support for compressed packages in four formats: ace, img, uue, and war HOT 2
- [Feature Request]: Extracting files whose names contain forbidden characters HOT 1
- Do I need to build 7zip myself? HOT 6
- [Bug]:
- [Bug]: Multiple Definition Linker Error for IID_IUnknown HOT 10
- [Bug]: BIT7Z_DISABLE_USE_STD_FILESYSTEM not working HOT 4
- [Bug]: Compile error when bit7z.lib is introduced into the project. HOT 11
- [Feature Request]: Is "tstring_to_path" forgotten here? HOT 1
- [Bug]: HOT 3
- [Feature Request]: Compresses files open for writing by another applications HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bit7z.