<HTML><BODY>I made package 'binary-class-exif'<BR>It does nearly the same that racket-mediafile, but uses binary-class, and so may write changes back<BR><BR>I cant't understand, why it gives different result for exif:user-comment when reading canon-ixus.jpg from<BR>examples from racket-mediafile.<BR><BR>binary-class-exif gives 136 zeros<BR>racket-mediafile gives #(undefined-type 136 #"*\2\0\0"))<BR><BR>Sun, 15 Jun 2014 21:59:24 -0400 от Neil Van Dyke <neil@neilvandyke.org>:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #0857a6 1px solid; PADDING-BOTTOM: 0px; MARGIN: 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; PADDING-TOP: 0px">
<DIV>
<DIV>
<DIV>
<DIV>Roman, this looks good.<BR><BR>I think one good test of your abstractions would be to parse JPEG Exif <BR>with some MakerNotes. IIRC, you have to things like read a value that <BR>is an offset from some other position (from top of file, start of <BR>header, current position...), to follow linked lists, and to have <BR>conditionals.<BR><BR>Another test would be getting video metadata out of popular video stream <BR>and container formats. This would also be very useful for working with <BR>video files.<BR><BR>Some documentation references are here:<BR><A href="http://www.neilvandyke.org/racket-mediafile/#%28part._.Content_.Types%29" target=_blank>http://www.neilvandyke.org/racket-mediafile/#%28part._.Content_.Types%29</A><BR>I didn't come up with a generalized high-level abstraction, but looks <BR>like you're on your way to doing it better than I did.<BR><BR>Neil V.<BR><BR>Roman Klochkov wrote at 06/15/2014 02:42 PM:<BR>> I've written universal library for parsing binary files or their parts <BR>> into Racket objects.<BR>> You may install it with 'raco pkg install binary-class'. This library <BR>> has verbose documentation and easy syntax.<BR>> You simply describe your data in terms of class fields and load the <BR>> object from the file.<BR>><BR>> I've written parsers for MP3 ID3 tags (binary-class-mp3 package) and <BR>> DBF files (binary-class-dbf package, no docs yet, only Readme at <BR>> <A href="https://github.com/Kalimehtar/binary-class-dbf" target=_blank>https://github.com/Kalimehtar/binary-class-dbf</A>). You may treat them as <BR>> usage examples for the library.<BR>><BR>> Please, give me feedback. Maybe I can do something better, or maybe <BR>> somebody write another file format to the library.<BR>><BR>><BR>> -- <BR>> Roman Klochkov<BR><BR></DIV></DIV></DIV></DIV></BLOCKQUOTE><BR><BR>-- <BR>Roman Klochkov<BR></BODY></HTML>