{
  "name": "WFDB signal file storage formats: sample representation and packing by format code",
  "description": "Compiled from the WFDB Applications Guide signal(5) manual page on PhysioNet. For each format code it gives how a sample is represented, the bits per sample, and the packing or byte-order notes the page states.",
  "page": "https://casrai.org/guides/wfdb",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-17T10:18:03Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Format code",
      "unit": "",
      "description": ""
    },
    {
      "name": "Sample representation",
      "unit": "",
      "description": ""
    },
    {
      "name": "Bits per sample",
      "unit": "bits",
      "description": ""
    },
    {
      "name": "Packing and notes",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Format code": "8",
      "Sample representation": "8-bit first difference; sample n = initial value plus the sum of the first n differences",
      "Bits per sample": 8,
      "Packing and notes": "Single bytes; out-of-range differences clipped to -128 or +127, so conversion into this format can lose information"
    },
    {
      "Format code": "16",
      "Sample representation": "16-bit two's-complement amplitude",
      "Bits per sample": 16,
      "Packing and notes": "Least significant byte first; unused high bits sign-extended"
    },
    {
      "Format code": "24",
      "Sample representation": "24-bit two's-complement amplitude",
      "Bits per sample": 24,
      "Packing and notes": "Least significant byte first"
    },
    {
      "Format code": "32",
      "Sample representation": "32-bit two's-complement amplitude",
      "Bits per sample": 32,
      "Packing and notes": "Least significant byte first"
    },
    {
      "Format code": "61",
      "Sample representation": "16-bit two's-complement amplitude",
      "Bits per sample": 16,
      "Packing and notes": "Most significant byte first"
    },
    {
      "Format code": "80",
      "Sample representation": "8-bit offset binary amplitude",
      "Bits per sample": 8,
      "Packing and notes": "Subtract 128 from each unsigned byte to get a signed value"
    },
    {
      "Format code": "160",
      "Sample representation": "16-bit offset binary amplitude",
      "Bits per sample": 16,
      "Packing and notes": "Subtract 32,768 from each unsigned byte pair; least significant byte first"
    },
    {
      "Format code": "212",
      "Sample representation": "12-bit two's-complement amplitude, bit-packed",
      "Bits per sample": 12,
      "Packing and notes": "Two samples in three bytes; the format used by most PhysioBank signal files"
    },
    {
      "Format code": "310",
      "Sample representation": "10-bit two's-complement amplitude, bit-packed",
      "Bits per sample": 10,
      "Packing and notes": "Three samples per two byte pairs; the low bit of each of the first two pairs is discarded"
    },
    {
      "Format code": "311",
      "Sample representation": "10-bit two's-complement amplitude, bit-packed",
      "Bits per sample": 10,
      "Packing and notes": "Three samples packed into a little-endian 32-bit integer; the top two bits are unused"
    },
    {
      "Format code": "508, 516, 524",
      "Sample representation": "FLAC-compressed signals at 8, 16 or 24 bits per sample",
      "Bits per sample": "8, 16 or 24",
      "Packing and notes": "At most eight signals per file; all signals share one sampling frequency; needs libFLAC"
    }
  ],
  "sources": [
    {
      "title": "WFDB Applications Guide: signal(5), WFDB signal file formats",
      "url": "https://physionet.org/physiotools/wag/signal-5.htm",
      "accessed": "2026-11-17"
    }
  ]
}