remove zero frame in start of compressed data

- pzstd does the same and future frameformat definition will be adjusted
This commit is contained in:
Tino Reichardt
2016-12-24 13:31:47 +01:00
parent 294d1ece66
commit e123752e09

View File

@@ -188,21 +188,6 @@ static size_t pt_write(ZSTDMT_CCtx * ctx, struct writelist *wl)
/* move the entry to the done list */
list_move(&wl->node, &ctx->writelist_done);
/* write zero byte frame (9 bytes) for type identification */
if (unlikely(wl->frame == 0)) {
unsigned char frame0[] =
{ 0x28, 0xB5, 0x2F, 0xFD, 0x00, 0x48, 0x01, 0x00, 0x00 };
ZSTDMT_Buffer b;
b.buf = frame0;
b.size = 9;
rv = ctx->fn_write(ctx->arg_write, &b);
if (rv < 0)
return mt_error(rv);
if (b.size != 9)
return ZSTDMT_ERROR(write_fail);
ctx->outsize += 9;
}
/* the entry isn't the currently needed, return... */
if (wl->frame != ctx->curframe)
return 0;