| 326 | } |
| 327 | |
| 328 | void rewriteHeader(File &f_out) { |
| 329 | // https://www.rfc-editor.org/rfc/rfc1950 |
| 330 | const uint8_t cmf = 0x48; // 4096 |
| 331 | // const uint8_t cmf = 0x58; // 8192 |
| 332 | uint8_t flg, flevel = 3; |
| 333 | uint16_t header = cmf << 8 | (flevel << 6); |
| 334 | header += 31 - (header % 31); |
| 335 | flg = header & 0xFF; |
| 336 | f_out.seek(4); |
| 337 | f_out.write(cmf); |
| 338 | f_out.write(flg); |
| 339 | } |
| 340 | |
| 341 | #ifndef SAVE_SPACE |
| 342 | uint8_t *g5Compress(uint16_t width, uint16_t height, uint8_t *buffer, uint16_t buffersize, uint16_t &outBufferSize) { |