Closed markb-trustifi closed 4 years ago
Currently, the development of the project has not been followed, but I encourage you to try. Any improvement is always welcome. ;)
I added bounty to this issue: https://www.bountysource.com/issues/85157674-lzma2-algorithm-it-s-not-yet-implemented
It should be JS only solution, integrated to this library that receives buffer and returns back buffer as other implemented methods. The file for tests (inside zip) is:
I have looked on the code and made some tests. Maybe this will help:
I wish you all good luck
The LZMA library seams to be broken. There are a lot of issues and I also constantly get this error:
Error: corrupted input
at $init_0 (.../node_modules/lzma/src/lzma_worker.js:313:19)
Thank you for the update!
But the solution is not ready yet. This file check.7z.zip throws error:
LZMA2 control byte 2 is unsupported!
I see, some information about the byte 2 is here, if it can help: https://github.com/ulikunitz/xz/blob/master/doc/LZMA2.md#chunks
@markb-trustifi Yes, I looked into this, but sadly this can't be fixed without changes to lzma-purejs, or duplicating some of its functionality here, because lzma-purejs doesn't currently allow for partial LZMA state resets and dictionary resets (because it's not used in LZMA1).
The second option should not be too complex, I'll look into it when I have some time.
@jalcaldea can I have the commandline arguments that create 7Z archive with and without "byte 2"?
Now I'm using: 7z a -m1=LZMA2 archive.7z file.docx
@markb-trustifi From my tests, it should be able to read archives made with 7z a -m0=LZMA2 archive.7z file
.
@jalcaldea I see sometimes it creates archive with method "LZMA2:14" (it works) and sometimes with methods like "LZMA2:96k", "LZMA2:384k", ... (these don't work). Is this parameter relevant?
@markb-trustifi I've opened a new issue for this: https://github.com/jalcaldea/7z-stream/issues/5. If you could post any test files there that would be very helpful.
Is there a chance that the LZMA2 will be implemented?