History of LRF format

The LRF format is a proprietary format by Sony used in their e-readers.The format is still undocumented. Many efforts were done by enthusiasts to understand the format and to make utilities for LRF conversion since appearing Sony Librie (Japaneese version) reader on the market. This review is my personal vision of the history and is limited to the resources I used in my work. LRF conversion is rapidly growing area of the content generation development (inspired by new Sony Reader PRS-500). There are several other resources and wiki pages devoted to the LRF format and tools for conversion; the goal of this page is a review of major achievements for the beginners. This section reflects works done before February 2007, some links may not work. I'm not going to update this page for new resources, please visit forums listed in the Link section for up-to-date information.

The goal of this page is to provide a reference to the programs that can be used for understanding the LRF format, the program listed here are not the only (and not necessarily the best) way to make lrf content.


LRF format. This BINARY format used in Sony Librie and Sony PRS-500 Readers. The format is barely documented. Some very limited information can be found at http://www.sven.de/librie/Librie/BBeB . The LRF format can be understood with the python code of lrf2lrs converter and utilities for extracting the objects from LRF files (see below). The LRF can contain text or images, the ability to show images sometimes used by homemade programs with the reference to "picture" LRF (actually this is just simple implementation of one of the features of LRF format).

LRS (Librie Reader Source) format. LRS is a "source" XML format with the description for the objects used in LRF. This format was introduced in the Book Creator program (commercial program with Japanese interface) by Canon (see below). The format is documented: http://www.y-adagio.com/public/committees/iec_pt62448/1_np(0509)/100_1017e_DC.pdf . LRS files can be generated by either 3 ways: 1) with commercial Book Creator program by Canon; 2) with freeware Book Designer program (see below for more details) 3) with Python lrf2lrs converter by roxfan, Igor Skochinsky and several newly developed utilities available at www.mobileread.com.

BBeB "Broadband ebook" format by Sony. Another name of LRF and, sometimes, LRS formats.

Programs useful for understanding the LRF format

Major programs for understanding the LRF format, listed by date:

1. Book Creator Commercial program by Canon. First mentioned in yahoo Librie group in June 2004, see post #18). The program has Japanese interface. Since that time the development of homemade LRF content was started. First, many affords were done to make English version of Book Creator (see Librie yahoo group); Second, some homebrew programs use XYLogParser.dll (with Lrs2lrf wrapper by roxfan) to create LRF files from LRS source; Third, reverse engineering of LRF format was started to develop programs independent from XYLogParser.dll.

2. Makelrf program by scythic (first introduced in yahoo librie group in October, 2004). The program comes with C-code and available in the File section of Librie group. The program allows to create Lrf files from the text files with support of the images. The program cannot create rich lrf files (only basic objects are supported), but it is hard to underestimated the progress archived with the program. Till now makelrf is widely used in many other programs as an engine for creation either simple text LRF or image-based LRF. Until recently makelrf was used in BookDesigner program (in "simple" conversion mode); and JAP programs to generate image-based LRFs.

3. LRFParser by roxfan (yahoo Librie group, November 2004, comes with C-source). The program decompiles LRF files to the objects, including TOC, header and compressed streams. To my knowledge, LRFparser is the first program where complex LRF objects and majority of tags were understood.

4. lrf2lrs (first version signed by roxan, February 2006; yahoo Librie group); the latest versions (signed by roxfan, Igor Skochinsky) are available at www.mobileread.com (Sony Portable Reader - Reader Developer's Corner - Lrf2Lrs thread, posts by igorsk). (I believe that roxfan=Igor Skorchinsky=igorsk). With the program the LRF files can be converted to the LRS files. Up to date the source of this Python program is the major source of information on LRF objects and tags. Almost all possible LRF objects and tags are supported by the program.

5. LRFunpack (by me, available at download section of this site, November 2006). NET2.0 C# application for extracting objects from LRF files with some translation of the tags and description of the streams. Creates both dump hex files for each of the object together with the text files with some decryption. I was using this program to understand the LRF format. The advantage of this program - it never stops decompiling even if tag is unknown. Some example of decompiled lrf can be found at download section. Sorry, no source available.


I did not mention Java tools, because I never tried them myself. Please have a look at the forums of the sites listed in the Link section. I believe the most significant contributions are flatLrf (http://monalipse.sourceforge.jp/tmp/lrf/, January 2005) and LRFParser.java (by Scotty1024, May 2005, Librie yahoo group). FlatLrf is Java application to create lrf from html files; LRFParser.java is Java version of LRFParser by roxfan.

BookDesigner (Wiki page) (by Valerii Woizechovsky (aka vvv))). This program is an universal program for conversion between many formats, reading and ebook creation. The program creates LRS file, than the LRS file is converted to LRF with external third-party converters (makelrf, lrs2lrf , LRSparser by AlexXF, the latest version uses my MSH_Lrsparser). The strong side of the BookDesigner for understanding the LRF format is ability to generate custom LRS together with corresponding LRF file for further analysis.

LRF conversion utilities

Please refer to the Wiki page and the link section for recent progress on content generation. Recently Sony launched site for the developers at www. prslabs.com. Unfortunately there is almost no new information. The LRS format specification is given (the one mentioned above), the XYLogParser.dll (almost the same to the discussed above, it is also very slow), and the description of the interface around the XYLogparser.dll.