Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 73x 73x 71x 71x 1x 1x 1x 1x 1x 73x 73x 73x | import { EncodeContext } from '../encode'; import { VERSION } from '../version'; function encodeFloatQuality(context: EncodeContext) { const { writer, floatQuality } = context; switch (floatQuality) { case 'double': writer.writeUint8(0); break; case 'single': writer.writeUint8(1); break; default: writer.writeUint8(2); writer.writeIntVar(floatQuality); break; } } export function encodeHeader(context: EncodeContext) { const { writer } = context; writer.writeUintVar(VERSION); encodeFloatQuality(context); } |