From MultimediaWiki
Revision as of 04:59, 15 September 2006 by Haypo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hachoir is a file parser framework written in Python, features:

  • Autofix: On error, Hachoir can automatically fix errors on buggy file or parser (get more details) ;
  • Lazy: Field value, size, description, absolute address, (...) are computed on demand (get more details) ;
  • No arbitrary limit: Hachoir don't have arbitrary limit: addresses can be bigger than 4 Go, an integer can be 64 bits or more, there is no field number limit, etc. ;
  • Types: Hachoir have many predefined field types: integer, string, boolean, byte array, ... ;
  • Bit granularity: Size and address are in bits, so it's easy to mix fields with size in bytes or in bits ;
  • Unicode: String value are stored in Unicode (if string charset is specified) ;
  • Endian: You don't have to care about endian: you just need to set it once for the whole parser ;
  • No dependency: Hachoir just needs Python 2.4 (but some frontends need more libraries) ;
  • API: Data are represented as a tree of fields where each field is a Python object (get more details) ;
  • Parser: 30 parsers are included: JPEG picture, ZIP archive, MP3 audio, ... (see the [wiki:ParserList parser list]) ;
  • Guess parser: An algorithm automatically chooses the right parser using file extension, given MIME type or using validate() function of each parser ;
  • etc.

Website: http://hachoir.org/