-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test to check if chained encoders finishes #4
Add test to check if chained encoders finishes #4
Conversation
Hey, I do believe this test should pass, but it hangs indefinitely. The test chains 5 If you edit the chain number to cargo test --release -- chain This is the smaller test I saw failing while I was doing a bigger one with encoder and decoders. Idk, it's technically possible that bzip3 makes assumptions about buffers and I can't chain them like this. |
Related to #1, in Ouch it's possible to chain any number of formats when compressing or decompressing a file/archive. |
Good catch! This is a bug! Thanks for finding it. I'm on the way fixing them... For the tests, I hope |
e2ed199. all chained cases seem to be OK. I use an |
For reference, here is the original test I wrote, it chains write decoders with read encoders. Do you want to commit the tests yourself? Otherwise I can edit this PR and try merging one of the two tests I've shown you, Whatever you prefer, let me know 🙏. (Your responses are lightning quick ⚡⚡⚡, no need to rush though!) |
Oh, note that I set the random-data length to be bigger than the block size, that's to force I used:
One thing I just realized is that only the first one might be forced to write it all, because compressed data is shrunk down. 200KB -> ReadEncoder1 (reads 200KB) -> ReadEncoder2 (reads X) -> ReadEncoder3 (reads Y) If X and Y are below 70kb, then it's a single-block read, so we might have to do some tests and raise the random data length. Maybe having two different tests... one with smaller input for single-block processing, and one with bigger input for multi-block processing. |
Feel free to write the tests as your intention and needs, finish the PR thanks!
…---- Replied Message ----
| From | João ***@***.***> |
| Date | 06/12/2023 22:52 |
| To | ***@***.***> |
| Cc | Zhai ***@***.***>***@***.***> |
| Subject | Re: [bczhc/bzip3-rs] Add test to check if chained encoders finishes (PR #4) |
For reference, here is the original test I wrote, it chains write decoders with read encoders.
Do you want to commit the tests yourself? Otherwise I can edit this PR and try merging one of the two tests I've shown you, Whatever you prefer, let me know 🙏.
(Your responses are lightning quick ⚡⚡⚡, no need to rush though!)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
25c1eb4
to
2a2a179
Compare
Hey, I'm back from a long gaming break 🤓🎮 , can you re-review? Test passes since your last fix. |
for single-block and multiple-block encoding
2a2a179
to
b61aa21
Compare
Oops forgot to rebase. |
Oh great! LGTM, thanks! |
With this merged I think I can go back to the Ouch side, I was getting a bug with chained formats and I think that was the cause. I'll keep you updated on my progress in the other issue. |
No description provided.