39 stub_compress_init(
struct compress_context *compctx)
44 stub_compress_uninit(
struct compress_context *compctx)
50 struct compress_context *compctx,
59 uint8_t *head =
BPTR(buf);
60 uint8_t *tail =
BEND(buf);
66 *head = NO_COMPRESS_BYTE_SWAP;
71 *header = NO_COMPRESS_BYTE;
77 struct compress_context *compctx,
87 uint8_t *head =
BPTR(buf);
91 if (c != NO_COMPRESS_BYTE_SWAP)
93 dmsg(
D_COMP_ERRORS,
"Bad compression stub (swap) decompression header byte: %d", c);
101 if (c != NO_COMPRESS_BYTE)
112 struct compress_context *compctx,
120 compv2_escape_data_ifneeded(buf);
124 stubv2_decompress(
struct buffer *buf,
struct buffer work,
125 struct compress_context *compctx,
133 uint8_t *head =
BPTR(buf);
136 if (head[0] != COMP_ALGV2_INDICATOR_BYTE)
153 if (head[0] != COMP_ALGV2_UNCOMPRESSED_BYTE)
155 dmsg(
D_COMP_ERRORS,
"Bad compression stubv2 decompression header byte: %d", *head);
161 const struct compress_alg compv2_stub_alg = {
164 stub_compress_uninit,
169 const struct compress_alg comp_stub_alg = {
172 stub_compress_uninit,