Skip to content

Clean up of gzip decompressor

Daniel P. Smith xen-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 14 repliesIn review
  2. v26 patches 7 repliesSuperseded
  3. v15 patches 22 repliesSuperseded

Changes in v3 from the cover letter

- patch "xen/gzip: Drop huffman code table tracking" was merged
- patch "xen/gzip: Remove custom memory allocator" was merged
- patch "xen/gzip: Drop unused define checks" was merged
- move of the decompressor state into struct was broken up to ease review
- expanded macros that were either only used once or obsfucated the logic
- adjusted variable types as needed to be more appropriate for their usage

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8gzip: clean up comments and fix code alignmentxen/common/gzip/gunzip.c xen/common/gzip/inflate.c+406 -3951 reply
2/8gzip: refactor and expand macrosxen/common/gzip/gunzip.c xen/common/gzip/inflate.c+30 -451 reply
3/8gzip: refactor the gunzip window into common statexen/common/gzip/gunzip.c xen/common/gzip/inflate.c+48 -411 reply
4/8gzip: move window pointer into gunzip statexen/common/gzip/gunzip.c xen/common/gzip/inflate.c+13 -151 reply
5/8gzip: move input buffer handling into gunzip statexen/common/gzip/gunzip.c xen/common/gzip/inflate.c+57 -581 reply
6/8gzip: move output buffer into gunzip statexen/common/gzip/gunzip.c xen/common/gzip/inflate.c+5 -41 reply
7/8gzip: move bitbuffer into gunzip statexen/common/gzip/gunzip.c xen/common/gzip/inflate.c+23 -234 replies
8/8gzip: move crc state into gunzip statexen/common/gzip/gunzip.c xen/common/gzip/inflate.c+12 -132 replies

Reviews trailers per patch

3 of 8 patches have a Reviewed-by or Acked-by.

PatchAndrew CooperJan Beulich
1/8A-b
2/8
3/8
4/8A-b
5/8
6/8
7/8A-b
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/8] Clean up of gzip decompressor

An issue ran into by hyperlaunch was the need to use the gzip decompressor multiple times. The current implementation fails when reused due to tainting of decompressor state from a previous usage. This series seeks to colocate the gzip unit files under a single directory similar to the other decompression algorithms. To enable the refactoring of the state tracking, the code is then cleaned up in line with Xen coding style.

Changes in v3:
- patch "xen/gzip: Drop huffman code table tracking" was merged
- patch "xen/gzip: Remove custom memory allocator" was merged
- patch "xen/gzip: Drop unused define checks" was merged
- move of the decompressor state into struct was broken up to ease review
- expanded macros that were either only used once or obsfucated the logic
- adjusted variable types as needed to be more appropriate for their usage

Changes in v2:
- patch "xen/gzip: Colocate gunzip code files" was merged
- dropped ifdef chunks that are never enabled
- addressed formatting changes missed in v1
- replaced custom memory allocator with xalloc_bytes()
- renamed gzip_data to gzip_state
- moved gzip_state to being dynamically allocated
- changed crc table to the explicit size of uint32_t
- instead of moving huffman tracking into state, dropped altogether

Daniel P. Smith (8):
gzip: clean up comments and fix code alignment
gzip: refactor and expand macros
gzip: refactor the gunzip window into common state
gzip: move window pointer into gunzip state
gzip: move input buffer handling into gunzip state
gzip: move output buffer into gunzip state
gzip: move bitbuffer into gunzip state
gzip: move crc state into gunzip state

 xen/common/gzip/gunzip.c  |  84 ++--
 xen/common/gzip/inflate.c | 948 +++++++++++++++++++-------------------
 2 files changed, 516 insertions(+), 516 deletions(-)
Signature · 1 line
2.30.2