Skip to content

Conversation

zwimer
Copy link

@zwimer zwimer commented Sep 3, 2024

This PR fixes:

  1. Fixes Update ssh_filter_btrbk.sh to allow stream_compress with adaptive compression #600 by allowing --adapt to be whitelisted for zstd instead of a specified compression level
  2. Expands the existing compression regex to match compression level [0-9]{1,2} instead of just [0,9]. This allows users to use compression levels higher than 9, like zstd -c -10
  3. There were 5 tabs in the file that was otherwise formatted with spaces- it fixes that

@zwimer zwimer changed the title Resolve https://github.com/digint/btrbk/issues/600 ssh_filter_btrbk.sh allow zstd --adapt Resolve #600 ssh_filter_btrbk.sh allow zstd --adapt Sep 3, 2024
@HaleTom
Copy link

HaleTom commented Apr 25, 2025

Oops, I just saw this PR after I fixed this in #617.

I'm also supporting --long[=N] which man zstd says is required for --adapt to work.

@zwimer
Copy link
Author

zwimer commented Oct 2, 2025

@digint Is there anything I can do to get this merged?

@HaleTom
Copy link

HaleTom commented Oct 3, 2025

Is there anything I can do to get this merged?

Are you also supporting --long[=N] which man zstd says is required for --adapt to work?

(See my PR for hints and maybe other improvements too?)

@zwimer
Copy link
Author

zwimer commented Oct 3, 2025

@HaleTom I believe --long is not actually required for --adapt; the wording on the man page is unfortunately just confusing- it is saying "you may combine this with --long". What it requires is non-single threaded mode; you can check this with cat /dev/zero | zstd --adapt --single-thread and see it spits back an error but cat /dev/zero | zstd --adapt -v > /dev/null works, as you can see via the -v.

This PR does not support --long though, as it's a separate feature. I'm fine with either PR being merged depending on if @digint is fine with --long or not.

@HaleTom
Copy link

HaleTom commented Oct 4, 2025

I'm likewise fine with either PR being accepted.

I think that mine's (#617) neater because:

  • I was able to make it neater based on your excellent existing work after I found it :)
  • It allows for both --long (future proofing) and --adapt.

@digint
Copy link
Owner

digint commented Oct 7, 2025

@digint Is there anything I can do to get this merged?

I really hope to get some time next week to work on btrbk, and especially also to look at this MR (and @HaleTom 's).
I'm afraid there's so much going on currently, I can't promise anything right now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update ssh_filter_btrbk.sh to allow stream_compress with adaptive compression
3 participants