[File] [PATCH] OpenFst blobs

Christos Zoulas christos at zoulas.com
Mon Sep 30 16:07:29 UTC 2019


On Sep 29,  4:36pm, mjansche at gmail.com (Martin Jansche) wrote:
-- Subject: [File] [PATCH] OpenFst blobs

| Here (below the line) are magic numbers for OpenFst binary formats. The
| formatting seems to have been lost when pasting into mail, unfortunately.
| 
| Empirically pstring/l works with Pascal-style strings that have a 4-byte LE
| length, even though man magic(5) says that /l should indicate 2 bytes;
| pstring/L does not work. I wonder if something is amiss there. Here's a
| test case:

Perhaps your man page is our of date?

              pstring     A Pascal-style string where the first byte/short/int
                          is interpreted as the unsigned length.  The length
                          defaults to byte and can be specified as a modifier.
                          The following modifiers are supported:
                          B  A byte length (default).
                          H  A 2 byte big endian length.
                          h  A 2 byte little endian length.
                          L  A 4 byte big endian length.
                          l  A 4 byte little endian length.
                          J  The length includes itself in its count.
                          The string is not NUL terminated.  ``J'' is used
                          rather than the more valuable ``I'' because this
                          type of length is a feature of the JPEG format.

Thanks,

christos


More information about the File mailing list