[fpc-pascal] freepascal lz4 library?
wkitty42 at windstream.net
wkitty42 at windstream.net
Mon Dec 2 13:16:09 CET 2024
TLDR; i'm looking for a (small?) Pascal library to handle lz4 data blocks
contained inside a data file...
i've looked for information on how to create and open blocks of lz4 compressed
data in data files... i haven't found much and i'm not sure i'm searching
properly... asking uncle google about "freepascal library to decompress lz4 data
blocks" seemed like it would be specific enough but nope...
i have a data file provided by another party... this file is made of multiple
lz4 blocks with a custom header at the beginning of each block... to process
each block, we read the custom header which contains a 4 byte magic number, 4
byte compressed block size, 4 byte decompressed block size, and a 4 byte
"separator"... the data for the compressed block follows till the end of the
compressed block size... then we simply loop through each of the blocks until
the end of the file...
i can do this in python3 but i would rather do it in Pascal because i have an
idea for a project that i think i want to write in Pascal... Freepascal and
possibly Lazarus are my weapons and the only thing i cannot find is the lz4 ammo
library i can use... once i figure this out, the next goal is figuring out how
to read and write the contained JSON data...
it has been over a decade, now, since i last wrote any Pascal code and that was
35+ years of on and off writing command line text mode stuff... i plan to start
this project as a command line text mode application and then, hopefully, easily
add a clicky GUI to it or wrap a clicky GUI around the guts of the file handling
and (de)compressing code...
--
NOTE: No off-list assistance is given without prior approval.
*Please keep mailing list traffic on the list where it belongs!*
More information about the fpc-pascal
mailing list