fortplot_zlib Module

Pure Fortran implementation of zlib compression, decompression, and CRC32 Ported from STB image libraries for self-contained PNG support



Functions

public function crc32_calculate(data, data_len) result(crc)

Calculate CRC32 checksum using standard polynomial

Arguments

Type IntentOptional Attributes Name
integer(kind=int8), intent(in) :: data(*)
integer, intent(in) :: data_len

Return Value integer(kind=int32)

public function zlib_compress(input_data, input_len, output_len) result(output_data)

Full deflate compression with LZ77 and Huffman coding

Arguments

Type IntentOptional Attributes Name
integer(kind=int8), intent(in) :: input_data(*)
integer, intent(in) :: input_len
integer, intent(out) :: output_len

Return Value integer(kind=int8), allocatable, (:)