Lines Matching defs:stream

105 	z_stream        stream;
115 zlib_compressed_data_reader(pgp_stream_t *stream, void *dest, size_t length,
159 if (!pgp_stacked_limited_read(stream, z->in, n,
175 "Compressed stream ended before packet end.");
202 bzip2_compressed_data_reader(pgp_stream_t *stream, void *dest, size_t length,
237 if (!pgp_stacked_limited_read(stream,
254 "Compressed stream ended before packet end.");
282 * \param *stream How to parse
287 pgp_decompress(pgp_region_t *region, pgp_stream_t *stream,
334 PGP_ERROR_1(&stream->errors,
358 PGP_ERROR_1(&stream->errors,
368 PGP_ERROR_1(&stream->errors,
370 "Cannot initialise ZIP or ZLIB stream for decompression: error=%d", ret);
373 pgp_reader_push(stream, zlib_compressed_data_reader,
380 PGP_ERROR_1(&stream->errors,
382 "Cannot initialise BZIP2 stream for decompression: error=%d", ret);
385 pgp_reader_push(stream, bzip2_compressed_data_reader,
391 PGP_ERROR_1(&stream->errors,
397 ret = pgp_parse(stream, !printerrors);
399 pgp_reader_pop(stream);
430 zip->stream.zalloc = Z_NULL;
431 zip->stream.zfree = Z_NULL;
432 zip->stream.opaque = NULL;
437 if ((int)deflateInit(&zip->stream, level) != Z_OK) {
463 /* setup stream */
464 zip->stream.next_in = zip->src;
465 zip->stream.avail_in = (unsigned)sz_in;
466 zip->stream.total_in = 0;
468 zip->stream.next_out = zip->dst;
469 zip->stream.avail_out = (unsigned)sz_out;
470 zip->stream.total_out = 0;
473 r = deflate(&zip->stream, Z_FINISH);
478 pgp_write_length(out, (unsigned)(zip->stream.total_out + 1))&&
480 pgp_write(out, zip->dst, (unsigned)zip->stream.total_out);