MCPcopy Create free account
hub / github.com/OpenEPaperLink/OpenEPaperLink / rewriteHeader

Function rewriteHeader

ESP32_AP-Flasher/src/makeimage.cpp:328–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328void 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
342uint8_t *g5Compress(uint16_t width, uint16_t height, uint8_t *buffer, uint16_t buffersize, uint16_t &outBufferSize) {

Callers 1

spr2bufferFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected