Differential Pulse-Code Modulation, an order-1 predictive transform that stores each sample as its difference (modulo 256) from the immediately preceding sample, with the first sample stored verbatim. Effective for correlated signal data such as audio samples or slowly varying sensor readings, where residuals cluster near zero and compress well with an entropy coder.
| Property | Value |
|---|---|
| Category | Compression Algorithms |
| Sub-category | Transform |
| Security status | Not classified |
| Complexity | Beginner |
| Inventor | C. Chapin Cutler |
| Year | 1950 |
| Origin | πΊπΈ United States |
| Source | algorithms/compression/dpcm.js |
Status: not classified β treat as unverified.
No vulnerabilities are recorded for this implementation.
4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Empty data test
Source: Edge case test
| Field | Value |
|---|---|
input |
(empty) |
expected |
(empty) |
Vector 2 β Single sample test
Source: Minimal DPCM test
| Field | Value |
|---|---|
input |
41 |
expected |
41 |
Vector 3 β Incrementing sequence, ideal for DPCM
| Field | Value |
|---|---|
input |
0a0c0e10 |
expected |
0a020202 |
Vector 4 β Wraparound across the 0/255 boundary (modulo-256 residual)
| Field | Value |
|---|---|
input |
fa0a05 |
expected |
fa10fb |