Displaying 1 result from an estimated 1 matches for "lzma_block_size".
2013 Mar 15
0
[PATCH 4.1] Add DomU xz kernel decompression
...t)stream->total_out);
*blob = out_buf;
- *size = stream.total_out;
+ *size = stream->total_out;
lzma_cleanup:
- lzma_end(&stream);
+ lzma_end(stream);
return retval;
}
+/* 128 Mb is the minimum size (half-way) documented to work for all inputs. */
+#define LZMA_BLOCK_SIZE (128*1024*1024)
+
+static int xc_try_xz_decode(
+ struct xc_dom_image *dom, void **blob, size_t *size)
+{
+ lzma_stream stream = LZMA_STREAM_INIT;
+ lzma_ret ret = lzma_stream_decoder(&stream, LZMA_BLOCK_SIZE, 0);
+
+ return _xc_try_lzma_decode(dom, blob, size, &stream, ret, &qu...