Lines Matching refs:stream
84 struct squashfs_xz *stream; in squashfs_xz_init() local
87 stream = kmalloc(sizeof(*stream), GFP_KERNEL); in squashfs_xz_init()
88 if (stream == NULL) { in squashfs_xz_init()
93 stream->state = xz_dec_init(XZ_PREALLOC, comp_opts->dict_size); in squashfs_xz_init()
94 if (stream->state == NULL) { in squashfs_xz_init()
95 kfree(stream); in squashfs_xz_init()
100 return stream; in squashfs_xz_init()
110 struct squashfs_xz *stream = strm; in squashfs_xz_free() local
112 if (stream) { in squashfs_xz_free()
113 xz_dec_end(stream->state); in squashfs_xz_free()
114 kfree(stream); in squashfs_xz_free()
126 struct squashfs_xz *stream = strm; in squashfs_xz_uncompress() local
128 xz_dec_reset(stream->state); in squashfs_xz_uncompress()
129 stream->buf.in_pos = 0; in squashfs_xz_uncompress()
130 stream->buf.in_size = 0; in squashfs_xz_uncompress()
131 stream->buf.out_pos = 0; in squashfs_xz_uncompress()
132 stream->buf.out_size = PAGE_SIZE; in squashfs_xz_uncompress()
133 stream->buf.out = squashfs_first_page(output); in squashfs_xz_uncompress()
138 if (stream->buf.in_pos == stream->buf.in_size) { in squashfs_xz_uncompress()
151 stream->buf.in = data + offset; in squashfs_xz_uncompress()
152 stream->buf.in_size = avail; in squashfs_xz_uncompress()
153 stream->buf.in_pos = 0; in squashfs_xz_uncompress()
157 if (stream->buf.out_pos == stream->buf.out_size) { in squashfs_xz_uncompress()
158 stream->buf.out = squashfs_next_page(output); in squashfs_xz_uncompress()
159 if (stream->buf.out != NULL) { in squashfs_xz_uncompress()
160 stream->buf.out_pos = 0; in squashfs_xz_uncompress()
165 xz_err = xz_dec_run(stream->state, &stream->buf); in squashfs_xz_uncompress()
176 return error ? error : total + stream->buf.out_pos; in squashfs_xz_uncompress()