123456789101112131415161718192021222324252627282930313233343536 |
- #pragma once
- #include "common.h"
- #include "fw.h"
- #include <zlib.h>
- struct spz_stream;
- typedef struct spz_stream spz_stream;
- #define SPZ_NBUF 4
- struct spz_stream {
- z_stream zs;
- read_func_t read_data;
- token_t token;
- uint8_t *optr;
-
- union {
- uint8_t *bufs[SPZ_NBUF];
- struct {
- uint8_t *ibuf;
- uint8_t *obuf;
- uint8_t *dbuf;
- uint8_t *vbuf;
- };
- };
- struct fw_header header;
- struct fw_header vmatch;
- int err;
- bool eoi;
- bool cleanup;
- bool esp_updated;
- bool fpga_updated;
- };
- int spz_read_data(spz_stream *spz, void *buf, size_t len);
|