• Home
  • Raw
  • Download

Lines Matching refs:compressor

71 g_zlib_compressor_set_gzheader (GZlibCompressor *compressor)  in g_zlib_compressor_set_gzheader()  argument
77 if (compressor->format != G_ZLIB_COMPRESSOR_FORMAT_GZIP || in g_zlib_compressor_set_gzheader()
78 compressor->file_info == NULL) in g_zlib_compressor_set_gzheader()
81 memset (&compressor->gzheader, 0, sizeof (gz_header)); in g_zlib_compressor_set_gzheader()
82 compressor->gzheader.os = 0x03; /* Unix */ in g_zlib_compressor_set_gzheader()
84 filename = g_file_info_get_name (compressor->file_info); in g_zlib_compressor_set_gzheader()
85 compressor->gzheader.name = (Bytef *) filename; in g_zlib_compressor_set_gzheader()
86 compressor->gzheader.name_max = filename ? strlen (filename) + 1 : 0; in g_zlib_compressor_set_gzheader()
88 compressor->gzheader.time = in g_zlib_compressor_set_gzheader()
89 (uLong) g_file_info_get_attribute_uint64 (compressor->file_info, in g_zlib_compressor_set_gzheader()
92 if (deflateSetHeader (&compressor->zstream, &compressor->gzheader) != Z_OK) in g_zlib_compressor_set_gzheader()
93 g_warning ("unexpected zlib error: %s", compressor->zstream.msg); in g_zlib_compressor_set_gzheader()
104 GZlibCompressor *compressor; in G_DEFINE_TYPE_WITH_CODE() local
106 compressor = G_ZLIB_COMPRESSOR (object); in G_DEFINE_TYPE_WITH_CODE()
108 deflateEnd (&compressor->zstream); in G_DEFINE_TYPE_WITH_CODE()
110 if (compressor->file_info) in G_DEFINE_TYPE_WITH_CODE()
111 g_object_unref (compressor->file_info); in G_DEFINE_TYPE_WITH_CODE()
123 GZlibCompressor *compressor; in g_zlib_compressor_set_property() local
125 compressor = G_ZLIB_COMPRESSOR (object); in g_zlib_compressor_set_property()
130 compressor->format = g_value_get_enum (value); in g_zlib_compressor_set_property()
134 compressor->level = g_value_get_int (value); in g_zlib_compressor_set_property()
138 g_zlib_compressor_set_file_info (compressor, g_value_get_object (value)); in g_zlib_compressor_set_property()
154 GZlibCompressor *compressor; in g_zlib_compressor_get_property() local
156 compressor = G_ZLIB_COMPRESSOR (object); in g_zlib_compressor_get_property()
161 g_value_set_enum (value, compressor->format); in g_zlib_compressor_get_property()
165 g_value_set_int (value, compressor->level); in g_zlib_compressor_get_property()
169 g_value_set_object (value, compressor->file_info); in g_zlib_compressor_get_property()
179 g_zlib_compressor_init (GZlibCompressor *compressor) in g_zlib_compressor_init() argument
186 GZlibCompressor *compressor; in g_zlib_compressor_constructed() local
189 compressor = G_ZLIB_COMPRESSOR (object); in g_zlib_compressor_constructed()
191 if (compressor->format == G_ZLIB_COMPRESSOR_FORMAT_GZIP) in g_zlib_compressor_constructed()
194 res = deflateInit2 (&compressor->zstream, in g_zlib_compressor_constructed()
195 compressor->level, Z_DEFLATED, in g_zlib_compressor_constructed()
199 else if (compressor->format == G_ZLIB_COMPRESSOR_FORMAT_RAW) in g_zlib_compressor_constructed()
202 res = deflateInit2 (&compressor->zstream, in g_zlib_compressor_constructed()
203 compressor->level, Z_DEFLATED, in g_zlib_compressor_constructed()
208 res = deflateInit (&compressor->zstream, compressor->level); in g_zlib_compressor_constructed()
214 g_warning ("unexpected zlib error: %s", compressor->zstream.msg); in g_zlib_compressor_constructed()
216 g_zlib_compressor_set_gzheader (compressor); in g_zlib_compressor_constructed()
283 GZlibCompressor *compressor; in g_zlib_compressor_new() local
285 compressor = g_object_new (G_TYPE_ZLIB_COMPRESSOR, in g_zlib_compressor_new()
290 return compressor; in g_zlib_compressor_new()
304 g_zlib_compressor_get_file_info (GZlibCompressor *compressor) in g_zlib_compressor_get_file_info() argument
306 g_return_val_if_fail (G_IS_ZLIB_COMPRESSOR (compressor), NULL); in g_zlib_compressor_get_file_info()
308 return compressor->file_info; in g_zlib_compressor_get_file_info()
328 g_zlib_compressor_set_file_info (GZlibCompressor *compressor, in g_zlib_compressor_set_file_info() argument
331 g_return_if_fail (G_IS_ZLIB_COMPRESSOR (compressor)); in g_zlib_compressor_set_file_info()
333 if (file_info == compressor->file_info) in g_zlib_compressor_set_file_info()
336 if (compressor->file_info) in g_zlib_compressor_set_file_info()
337 g_object_unref (compressor->file_info); in g_zlib_compressor_set_file_info()
340 compressor->file_info = file_info; in g_zlib_compressor_set_file_info()
341 g_object_notify (G_OBJECT (compressor), "file-info"); in g_zlib_compressor_set_file_info()
343 g_zlib_compressor_set_gzheader (compressor); in g_zlib_compressor_set_file_info()
349 GZlibCompressor *compressor = G_ZLIB_COMPRESSOR (converter); in g_zlib_compressor_reset() local
352 res = deflateReset (&compressor->zstream); in g_zlib_compressor_reset()
354 g_warning ("unexpected zlib error: %s", compressor->zstream.msg); in g_zlib_compressor_reset()
357 g_zlib_compressor_set_gzheader (compressor); in g_zlib_compressor_reset()
371 GZlibCompressor *compressor; in g_zlib_compressor_convert() local
375 compressor = G_ZLIB_COMPRESSOR (converter); in g_zlib_compressor_convert()
377 compressor->zstream.next_in = (void *)inbuf; in g_zlib_compressor_convert()
378 compressor->zstream.avail_in = inbuf_size; in g_zlib_compressor_convert()
380 compressor->zstream.next_out = outbuf; in g_zlib_compressor_convert()
381 compressor->zstream.avail_out = outbuf_size; in g_zlib_compressor_convert()
389 res = deflate (&compressor->zstream, flush); in g_zlib_compressor_convert()
401 _("Internal error: %s"), compressor->zstream.msg); in g_zlib_compressor_convert()
420 *bytes_read = inbuf_size - compressor->zstream.avail_in; in g_zlib_compressor_convert()
421 *bytes_written = outbuf_size - compressor->zstream.avail_out; in g_zlib_compressor_convert()