[Haskell-beginners] parsing exif file: binary, binary-strict, or cereal?
gale at sefer.org
Sun Apr 13 14:30:48 UTC 2014
Emmanuel Touzery wrote:
> I could not find a pure haskell library to parse EXIF so I wrote one
> (pretty basic so far):
Very nice! Why not upload it to hackage to make it easier
for others to share and collaborate?
> I wrote it with binary-strict. I also considered binary, but I would like
> the library not to throw an exception if the file that it's given is not a
> JPEG or is a JPEG without EXIF, but rather return an Either. I didn't manage
> to do that with binary
Perhaps the function Data.Binary.Get.runGetOrFail is what
you are looking for? Or perhaps the incremental strict interface?
> And then I realized that binary-strict was last updated in 2010, it seems
> cereal is recommended for strict binary file parsing nowadays.
> So, what should I do? Leave it as it is? Port to cereal? Port to binary?
The binary-strict library is no longer maintained, since binary now also
provides a strict interface. Both binary and cereal are good choices.
Probably porting to binary would be easiest if you've already written
it for binary-strict, assuming runGetOrFail or the incremental interface
does what you want.
More information about the Beginners