ODC

application/vnd.oasis.opendocument.chart

Safe

Magic Bytes

Offset: 0
50 4B

The OpenDocument Chart (ODC) format is an XML-based file format for storing graphical charts, maintained by the Organization for the Advancement of Structured Information Standards (OASIS). It is primarily used within the LibreOffice and Apache OpenOffice suites to represent standalone chart data or integrated components within larger documents. As a ZIP-compressed archive of XML files, the format is generally considered safe, though it is increasingly superseded by embedding charts directly into spreadsheet or text files.

Extension

.odc

MIME Type

application/vnd.oasis.opendocument.chart

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .odc files in Python

Python
def is_odc(file_path: str) -> bool:
    """Check if file is a valid ODC by magic bytes."""
    signature = bytes([0x50, 0x4B])
    with open(file_path, "rb") as f:
        return f.read(2) == signature

How to validate .odc files in Node.js

Node.js
function isODC(buffer: Buffer): boolean {
  const signature = Buffer.from([0x50, 0x4B]);
  return buffer.subarray(0, 2).equals(signature);
}
Go
func IsODC(data []byte) bool {
    signature := []byte{0x50, 0x4B}
    if len(data) < 2 {
        return false
    }
    return bytes.Equal(data[:2], signature)
}

API Endpoint

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

Related Formats