Skip to content

Conversation

@cuklev
Copy link
Contributor

@cuklev cuklev commented Feb 14, 2025

I hardcoded compression level 10. On my system it compresses the initramfs I generated under a second.

Numbers from my testing:

  • ugrd.cpio is 20MB
  • ugrd.cpio.xz is 6.2MB
    • Compression takes 14s
    • Decompression takes 0.5s
  • ugrd.cpio.zst is 7.5MB
    • Compress takes 0.88s
    • Decompression takes 0.08s

I hardcoded compression level 10. On my system it compresses the
initramfs I generated under a second.

Numbers from my testing:
* ugrd.cpio is 20MB
* ugrd.cpio.xz is 6.2MB
  * Compression takes 14s
  * Decompression takes 0.5s
* ugrd.cpio.zst is 7.5MB
  * Compress takes 0.88s
  * Decompression takes 0.08s
@desultory
Copy link
Owner

Thank you!

I think I will add some tests for this. One thing I've been considering is how the compression level should be specified.

I tried to make the compression option somewhat open ended (despite being somewhat hardcoded for xz) and wasn't sure how to generalize compression levels for various algorithms.

@desultory desultory merged commit e4a0383 into desultory:main Feb 14, 2025
3 checks passed
@desultory
Copy link
Owner

#11

I added a compression level setting here, and tried to generalize the imports a bit more, with improved error messages on failed imports.

@desultory
Copy link
Owner

desultory/ugrd#223

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.

2 participants