NetCDF

application/octet-stream

Safe

Magic Bytes

Offset: 0
6F 3C

The Network Common Data Form Language (CDL) is a text-based representation of NetCDF data structures maintained by the Unidata Program Center at UCAR. It is primarily used to define and describe the metadata, dimensions, variables, and attributes of multi-dimensional scientific datasets in a human-readable ASCII format. As a plain-text declaration format typically processed by command-line utilities to generate binary NetCDF files, CDL is considered safe and carries no inherent security risks.

Extension

.cdl

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .cdl files in Python

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

How to validate .cdl files in Node.js

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

API Endpoint

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

Related Formats