How would I go about this? I already got code which gets the data as an ArrayBuffer and a Uint8Array.
I can read all the bytes fine, until I get up to the compressed data in which I just don't know what to do.
How would I go about decompressing this data so I can actually read it?
***This should be done using client-side javascript code, I don't want my server to have to do anything to read the chunk from the file.
EDIT: This is a link to info about the zTXt chunk I need to decompress.
http://www.w3.org/TR/PNG/#11zTXt
It seems to mention I need to use zLib deflate compression to handle the file, but I can't find anything on how that works.
I have found libs that handle this, but i'd rather not use a pre-made lib for this purpose, I want to understand how the compression works and be able to do it myself, but nothing seems to mention how zlib deflation works.