I’m trying to make a program that produces pdf files as an output. I’ve been studying the pdf format specification and specific pdf files the format of which I’m seeking to mimic. There’s this line /FlateDecode in these documents and when I searched about this compression algorthm the google results referenced a built in .Net algorithm, Deflate.
The thing is, when I try to decode the encoded text from the aforementioned files using Deflate, the C# algorithm returns nothing (I copied the binary data in a hex editor into a new file, cutting off both the starting and trailing newline (0x0A)) and the online Deflate decoders say the text is invalid (here I copied the data from a text editor, so it was text in ANSI encoding), as in not encoded by the same algorithm, leading me to believe that despite google’s best efforts it popped up a similarly named, but not identical compression method.
If this hypothesis is correct, then does anybody know if there is a publicly available, already implemented Flate encoder or do I have to write my own based on the PDF file format specifications?
If the hypothesis is incorrect and I’m just screwing up something, what am I screwing up?