(w binary.Writer, length uint32)
| 160 | } |
| 161 | |
| 162 | func encodeLength(w binary.Writer, length uint32) { |
| 163 | if length >= 0x8000 { |
| 164 | panic("TODO: UNSUPPORTED") |
| 165 | } |
| 166 | w.Uint16(uint16(length)) |
| 167 | } |
| 168 | |
| 169 | // encodeChunk takes functions that output chunk-specific header and data to a writer, and then uses them to |
| 170 | // compute header and chunk sizes, as well as writing the whole chunk to a byte array, which is then returned. |
no test coverage detected