btrbk icon indicating copy to clipboard operation
btrbk copied to clipboard

Resolve #600 ssh_filter_btrbk.sh allow zstd --adapt

Open zwimer opened this issue 1 year ago • 1 comments
trafficstars

This PR fixes:

  1. Fixes #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 avatar Sep 03 '24 18:09 zwimer

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.

HaleTom avatar Apr 25 '25 08:04 HaleTom

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

zwimer avatar Oct 02 '25 23:10 zwimer

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?)

HaleTom avatar Oct 03 '25 00:10 HaleTom

@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.

zwimer avatar Oct 03 '25 01:10 zwimer

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.

HaleTom avatar Oct 04 '25 09:10 HaleTom

@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...

digint avatar Oct 07 '25 22:10 digint