Conversation
|
Thank you for your excellent work! Would it be possible to keep the same API as |
|
Thanks!
Yes I think it is totally possible, I think the What do you think about the internal byte array issue (i.e. |
|
I think I'll need to support different byte orders too (GIF is LSB and TIFF is MSB https://fuchsia.googlesource.com/third_party/wuffs/+/HEAD/std/lzw/README.md) |
It's a real question, but one that unfortunately goes beyond As far as Miou is concerned, there's nothing to stop you offering functions that read/write in bigarrays, like what
You can probably add whether it's LSB or MSB in the parameters for creating a decoder.2 type decoder
val decoder: order:[ `LSB | `MSB ] -> src -> decoder1: Only LZO has a different API but that's because the format isn't really streamable like zlib or gzip. |
There's an OCaml LZW decompressor here: https://github.com/johnwhitington/camlpdf/blob/master/pdfcodec.ml#L294 It's probably not the fastest, but it's solid, including on some common malformities. You might find it useful for comparison purposes. |
Hello! Thank you for the excellent library!
For ocaml-tiff I'm going to need to support LZW compression so I've started adding an implementation here for that compression scheme. This is still early and in draft whilst I'm still working out the kinks, but thought I would open it early in case people have opinions/views etc.