LibreOffice Module hwpfilter (master) 1
hgzip.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_HWPFILTER_SOURCE_HGZIP_H
21#define INCLUDED_HWPFILTER_SOURCE_HGZIP_H
22
23#include <zlib.h>
24
25class HStream;
30{
31 z_stream stream;
35 int z_err;
39 int z_eof;
51 uLong crc;
55 char *msg;
59 char mode;
60};
61
70gz_stream *gz_open ( HStream& _stream );
75int gz_close ( gz_stream *file );
83size_t gz_read ( gz_stream *file, voidp buf, unsigned len );
90int gz_flush ( gz_stream *file, int flush );
91#endif // INCLUDED_HWPFILTER_SOURCE_HGZIP_H
92
93/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
gz_stream * gz_open(HStream &_stream)
Opens a gzipped stream for reading.
Definition: hgzip.cxx:47
int gz_close(gz_stream *file)
Flushes all pending output if necessary, closes the compressed stream and deallocates all the (de)com...
Definition: hgzip.cxx:278
int gz_flush(gz_stream *file, int flush)
Flushes all pending output into the compressed file gz_flush should be called only when strictly nece...
Definition: hgzip.cxx:215
size_t gz_read(gz_stream *file, voidp buf, unsigned len)
Reads the given number of uncompressed bytes from the compressed stream.
Definition: hgzip.cxx:151
Structure for using z_stream.
Definition: hgzip.h:30
z_stream stream
Definition: hgzip.h:31
char mode
'w' or 'r'
Definition: hgzip.h:59
int z_eof
EOF of the input file.
Definition: hgzip.h:39
Byte * inbuf
Input buffer.
Definition: hgzip.h:47
uLong crc
Crc32 of uncompressed data.
Definition: hgzip.h:51
HStream * _inputstream
Stream.
Definition: hgzip.h:43
int z_err
The error code of z_stream operation.
Definition: hgzip.h:35
char * msg
Stream.
Definition: hgzip.h:55