On 2/16/21, Matthew Flatt <[email protected]> wrote:
> At Tue, 16 Feb 2021 15:44:54 -0500, Ben Greenman wrote:
>> But in my compressed string, the second
>> byte is #o357 for some reason. I'm not sure how that could have
>> happened ... some kind of encoding issue with string ports?
>
> Yes.
>
> You want `call-with-output-bytes` on the compress size and
> `call-with-input-bytes` on the decompress side. Otherwise, you'll get a
> UTF-8 decoding of compressed bytes (which is unlikely to be
> meaningful).
>

Thanks, that helps.

Sadly, I've already compressed a few files using
`call-with-output-string` ... is there an easy way to decompress those
/ undo the UTF-8 encoding?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAFUu9R5%3DsJFybrJPsqyChCEyKmBD4-7xeM8RXFdkFc6xYa-hWw%40mail.gmail.com.

Reply via email to