Skip to content
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

CompressLog: Add zstd compression #1404

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Aug 21, 2024

No description provided.

my $doTail = $tail ? "| tail -n '$tail'" : "";
open($fh, "-|", "bzip2 -dc < '$logPath' $doTail") or die;
if ($logPath =~ /\.zst$/) {
open($logFh, "-|", "zstd", "-dc", $logPath) or die;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SuperSandro2000 sorry, I got nerd snipped, when seeing shells being spawned with external inputs. Could you test this variant?

In the common case we just read 50 lines so it seems wasteful to shell
out. Also makes the decompression code a bit more readable.
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.

1 participant