Deflate compression, CRC32, and Adler-32 checksum implementation Extracted from fortplot_zlib_core for size compliance (Issue #1747)
Reverses the bits of a given value up to num_bits.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | value | |||
| integer, | intent(in) | :: | num_bits |
Backwards-compatible wrapper returning an allocatable result
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | input_data(*) | |||
| integer, | intent(in) | :: | input_len | |||
| integer, | intent(out) | :: | output_len |
Full deflate compression implementation with LZ77 and Huffman coding
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | input_data(*) | |||
| integer, | intent(in) | :: | input_len | |||
| integer(kind=int8), | intent(out), | allocatable | :: | output_data(:) | ||
| integer, | intent(out) | :: | output_len |
Initialize fixed Huffman tables as per RFC 1951
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out) | :: | literal_codes(0:285) | |||
| integer, | intent(out) | :: | literal_lengths(0:285) | |||
| integer, | intent(out) | :: | distance_codes(0:29) | |||
| integer, | intent(out) | :: | distance_lengths(0:29) |
Compress data into a newly allocated buffer with zlib wrapper
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | input_data(*) | |||
| integer, | intent(in) | :: | input_len | |||
| integer(kind=int8), | intent(out), | allocatable | :: | output_data(:) | ||
| integer, | intent(out) | :: | output_len |