(buffer)
| 2025 | } |
| 2026 | |
| 2027 | function assertPngBuffer(buffer) { |
| 2028 | const pngSignature = "89504e470d0a1a0a"; |
| 2029 | if (buffer.subarray(0, 8).toString("hex") !== pngSignature) { |
| 2030 | throw new Error("Expected PNG data."); |
| 2031 | } |
| 2032 | } |
| 2033 | |
| 2034 | function assertMp4Buffer(buffer) { |
| 2035 | if ( |
no test coverage detected