mirror of
https://github.com/sheumann/hush.git
synced 2024-10-11 10:23:41 +00:00
decompress_unxz: allocate permanent crc32 table _fisrt_
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
b9542cb2ce
commit
8376bfae58
@ -62,15 +62,15 @@ unpack_xz_stream(int src_fd, int dst_fd)
|
|||||||
OUT_SIZE = 60 * 1024,
|
OUT_SIZE = 60 * 1024,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!crc32_table)
|
||||||
|
crc32_table = crc32_filltable(NULL, /*endian:*/ 0);
|
||||||
|
|
||||||
membuf = xmalloc(IN_SIZE + OUT_SIZE);
|
membuf = xmalloc(IN_SIZE + OUT_SIZE);
|
||||||
memset(&iobuf, 0, sizeof(iobuf));
|
memset(&iobuf, 0, sizeof(iobuf));
|
||||||
iobuf.in = membuf;
|
iobuf.in = membuf;
|
||||||
iobuf.out = membuf + IN_SIZE;
|
iobuf.out = membuf + IN_SIZE;
|
||||||
iobuf.out_size = OUT_SIZE;
|
iobuf.out_size = OUT_SIZE;
|
||||||
|
|
||||||
if (!crc32_table)
|
|
||||||
crc32_table = crc32_filltable(NULL, /*endian:*/ 0);
|
|
||||||
|
|
||||||
state = xz_dec_init(64*1024); /* initial dict of 64k */
|
state = xz_dec_init(64*1024); /* initial dict of 64k */
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user