Encoding a book