projg2 / eclean-kernel

Installed kernel cleanup tool
GNU General Public License v2.0
31 stars 10 forks source link

fix zstd decompressor since initrd has no content size header #12

Closed Jannik2099 closed 2 years ago

Jannik2099 commented 3 years ago

It seems the kernel image and/or initrd may not include content size when compressed with zstd - switch to the zstd stream reader and read in chunks of 1MB until EOF

See the section above https://pypi.org/project/zstandard/ - Stream Reader API for details

codecov-io commented 3 years ago

Codecov Report

Merging #12 into master will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #12   +/-   ##
=======================================
  Coverage   84.42%   84.42%           
=======================================
  Files          16       16           
  Lines         745      745           
=======================================
  Hits          629      629           
  Misses        116      116           
Impacted Files Coverage Δ
ecleankernel/file.py 91.81% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 93f109e...085bc69. Read the comment docs.

Jannik2099 commented 3 years ago

yes, yes it is - somehow managed to pick the wrong commit, don't rebase at night! Will fix in a few minutes