Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/uzip/g_uzip_lzma.c
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
struct g_uzip_dapi * | struct g_uzip_dapi * | ||||
g_uzip_lzma_ctor(uint32_t blksz) | g_uzip_lzma_ctor(uint32_t blksz) | ||||
{ | { | ||||
struct g_uzip_lzma *lzp; | struct g_uzip_lzma *lzp; | ||||
lzp = malloc(sizeof(struct g_uzip_lzma), M_GEOM_UZIP, M_WAITOK); | lzp = malloc(sizeof(struct g_uzip_lzma), M_GEOM_UZIP, M_WAITOK); | ||||
xz_crc32_init(); | |||||
lzp->s = xz_dec_init(XZ_SINGLE, 0); | lzp->s = xz_dec_init(XZ_SINGLE, 0); | ||||
if (lzp->s == NULL) { | if (lzp->s == NULL) { | ||||
goto e1; | goto e1; | ||||
} | } | ||||
lzp->blksz = blksz; | lzp->blksz = blksz; | ||||
lzp->pub.max_blen = LZ4_compressBound(blksz); | lzp->pub.max_blen = LZ4_compressBound(blksz); | ||||
lzp->pub.decompress = &g_uzip_lzma_decompress; | lzp->pub.decompress = &g_uzip_lzma_decompress; | ||||
lzp->pub.free = &g_uzip_lzma_free; | lzp->pub.free = &g_uzip_lzma_free; | ||||
Show All 14 Lines |