LRF

application/octet-stream

Safe

Magic Bytes

Offset: 10
23 20 54 68 69 73 20 69 73 20 61 20 73 68 65 6C 6C 20 61 72 63 68 69 76 65

The BroadBand eBook (BBeB) format, commonly identified by the LRF extension, is a proprietary file type developed by Sony for use with its portable Reader devices. It serves as a container for digital publications, employing a fixed-layout structure to maintain consistent formatting across specific hardware screens. As a legacy format that was superseded by the EPUB standard in 2009, it is rarely used today and usually requires conversion for viewing on contemporary devices.

Extension

.lrf

MIME Type

application/octet-stream

Byte Offset

10

Risk Level

Safe

Validation Code

How to validate .lrf files in Python

Python
def is_lrf(file_path: str) -> bool:
    """
    Check if file is a valid LRF by magic bytes.
    Signature offset: 10 bytes
    """
    signature = bytes([0x23, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x73, 0x68, 0x65, 0x6C, 0x6C, 0x20, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65])
    with open(file_path, "rb") as f:
        f.seek(10)
        return f.read(25) == signature

How to validate .lrf files in Node.js

Node.js
function isLRF(buffer: Buffer): boolean {
  // Signature offset: 10 bytes
  const signature = Buffer.from([0x23, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x73, 0x68, 0x65, 0x6C, 0x6C, 0x20, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65]);
  if (buffer.length < 35) return false;
  return buffer.subarray(10, 35).equals(signature);
}
Go
func IsLRF(data []byte) bool {
    // Signature offset: 10 bytes
    signature := []byte{0x23, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x73, 0x68, 0x65, 0x6C, 0x6C, 0x20, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65}
    if len(data) < 35 {
        return false
    }
    return bytes.Equal(data[10:35], signature)
}

API Endpoint

GET /api/v1/lrf
curl https://filesignature.org/api/v1/lrf

Related Formats