Comments (6)
Please check the attached pre-release
59_3a.zip
And yes, the fix is a...fflush 😄
Let me know if OK
Thank you
from zpaqfranz.
It does seem to work now, thank you.
[f@pc:~/Documents]$ /tmp/zpaqfranz a "test_????.zpaq" kovcheg/ -m1 -key -chunk 490M
zpaqfranz v59.3a-JIT-L(2024-02-25)
franz:-method 1
Please do NOT start with '-' (minus)
Enter password :******************************************
franz:-key (hidden)
franz:-chunk 490.000.000
Creating test_0001.zpaq at offset 32 + 0
Add 2024-02-26 10:03:39 19.273 4.707.961.405 ( 4.38 GB) 12T (5.076 dirs)
24.349 +added, 0 -removed.
INFO: The last chunk is: test_0005.zpaq
32 + (4.707.961.405 -> 3.136.879.839 -> [CKS #5] 1.614.066.183) = 1.614.066.215 [TOT] @ 89.91 MB/s
49.938 seconds (000:00:49) (all OK)
[f@pc:~/Documents]$ zpaqfranz t "test_????.zpaq"
zpaqfranz v59.2q-JIT-L(2024-02-23)
Archive seems encrypted (or corrupted)
Enter password :******************************************
test_????.zpaq:
1 versions, 24.349 files, 2.104.078.887 bytes (1.96 GB)
To be checked 4.707.961.405 in 19.273 files (12 threads)
7.15 stage time 12.78 no error detected (RAM ~192.78 MB), try CRC-32 (if any)
Checking 20.966 blocks with CRC-32 (4.695.889.249 not-0 bytes)
Block 00020K 4.32 GB
CRC-32 time 0.63s
Blocks 4.695.889.249 ( 20.966)
Zeros 12.072.156 ( 40) 0.011000 s
Total 4.707.961.405 speed 7.508.710.374/sec (6.99 GB/s)
GOOD : 00019273 of 00019273 (stored=decompressed)
VERDICT : OK (CRC-32 stored vs decompressed)
13.405 seconds (000:00:13) (all OK)
from zpaqfranz.
This is the fix... the fflush
With encryption zpaq write a 32 bytes-long "prequel" on the archive, the "salt"
Then, in another position of the source code, read back (from the filesystem, with a fopen/fread on the archive) those 32 bytes
When the archive ALREADY exists (aka: updating), no problem.
But when archive (the very first "chunk") does NOT (aka: creating), on some non-Windows systems the write (of the seed, the very first 32 bytes) is keeped in some operating system buffer, cache or whatever.
Therefore, when zpaq read back the salt... get nothing, because the file (in the filesystem) is 0 bytes long, and not 32 as expected
=>
fflushing enforce to transfer the 32 bytes to the file, making a 32-bytes-long file, that can be readed back
if (off==0 && myfwrite(salt, 1, 32, fp)!=32)
ioerr(thefilename.c_str());
fflush(fp); /// unix fix
Be careful with fixed-sized-multipart, it is a "cutting edge" feature (required a LOT of spaghetti-code)
Thanks for your report
from zpaqfranz.
Can you please make a new release with this fix so that Linux distros would upgrade it?
from zpaqfranz.
It is a bug, present only in the *nix version (on Windows it does works)
... work in progress...
from zpaqfranz.
The source code already provides for the use of -chunk with encryption (the only function that cannot be used is -index, and I don't think it will be in the future)
If you are referring to the packages in the various distributions it is a very complex matter, it is not so easy to update them (it is not up to me).
I will try to contact the maintainers
from zpaqfranz.
Related Issues (20)
- Possible to provide standalone source code files? HOT 11
- Bus error HOT 30
- Windows x/extract Creates Subfolders When Using -longpath HOT 4
- Request: Wiki Update HOT 1
- ZPAQ Plugin for Total Commander and Double Commander HOT 4
- feature request: add FUSE mount option HOT 1
- Inconsistent longpath switch' behaviour HOT 9
- Verify zpaq files after compressd by zpaqfranz 59.1 with -chunk HOT 10
- Deleting old versions, add new files to an existing archive HOT 2
- Question: Symlinks are not added to ZPAQ archives? HOT 1
- Broken multi file archive HOT 10
- PAKKA GUI creates archives with unchosen flags HOT 17
- Checksum issues HOT 15
- windows VSS and verify issue HOT 13
- integrating with other software HOT 1
- Memory consumption HOT 14
- Found Unix attributes on Windows => checking for collision HOT 5
- buffer overflow after compiling with FORTIFY_SOURCE=3 HOT 3
- Trim command not working on multi part archive? HOT 3
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 zpaqfranz.