Documentation ¶
Overview ¶
Package pdb implements reading and writing PalmDB databases.
Index ¶
Constants ¶
View Source
const PalmDBHeaderLength = 78 // 0x4F
View Source
const RecordHeaderLength = 8 // 0x08
Variables ¶
View Source
var Endian = binary.BigEndian
Endian describes the byte-order of integers in Palm databases.
Functions ¶
This section is empty.
Types ¶
type Database ¶
Database represents an in-memory Palm database.
func NewDatabase ¶
NewDatabase creates an empty Palm database with name.
func ReadDatabase ¶
ReadDatabase reads an uninterpreted Palm database from r.
func (*Database) AddRecord ¶
AddRecord adds a generic record to the Palm database.
Returns the index of the inserted record.
func (*Database) ReplaceRecord ¶
ReplaceRecord overrides the record at index i in the Palm database.
Panics if index i is out of range.
type PalmDBHeader ¶
type PalmDBHeader struct { Name [32]byte FileAttributes uint16 Version uint16 CreationTime uint32 // Timestamp ModificationTime uint32 // Timestamp BackupTime uint32 // Timestamp ModificationNumber uint32 AppInfo uint32 SortInfo uint32 Type [4]byte // BOOK Creator [4]byte // MOBI LastRecordUID uint32 NextRecordList uint32 // Always zero NumRecords uint16 }
func NewPalmDBHeader ¶
Click to show internal directories.
Click to hide internal directories.