OFFIS DCMTK  Version 3.6.0
dcistrmz.h
1 /*
2  *
3  * Copyright (C) 1994-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmdata
15  *
16  * Author: Marco Eichelberg
17  *
18  * Purpose: zlib compression filter for input streams
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:15:41 $
22  * CVS/RCS Revision: $Revision: 1.5 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DCISTRMZ_H
30 #define DCISTRMZ_H
31 
32 #include "dcmtk/config/osconfig.h"
33 
34 #ifdef WITH_ZLIB
35 
36 #include "dcmtk/dcmdata/dcistrma.h" /* for DcmInputFilter */
37 
38 BEGIN_EXTERN_C
39 #include <zlib.h>
40 END_EXTERN_C
41 
47 extern OFGlobal<OFBool> dcmZlibExpectRFC1950Encoding;
48 
52 {
53 public:
54 
57 
59  virtual ~DcmZLibInputFilter();
60 
65  virtual OFBool good() const;
66 
71  virtual OFCondition status() const;
72 
76  virtual OFBool eos();
77 
85  virtual offile_off_t avail();
86 
92  virtual offile_off_t read(void *buf, offile_off_t buflen);
93 
98  virtual offile_off_t skip(offile_off_t skiplen);
99 
104  virtual void putback(offile_off_t num);
105 
112  virtual void append(DcmProducer& producer);
113 
114 private:
115 
118 
121 
127  offile_off_t fillInputBuffer();
128 
136  offile_off_t decompress(const void *buf, offile_off_t buflen);
137 
141  void fillOutputBuffer();
142 
147  void flushOutputBuffer();
148 
155  offile_off_t fillInputBuffer(const void *buf, offile_off_t buflen);
156 
164  void compressInputBuffer(OFBool finalize);
165 
166 
169 
171  z_streamp zstream_;
172 
175 
177  OFBool eos_;
178 
180  unsigned char *inputBuf_;
181 
183  offile_off_t inputBufStart_;
184 
186  offile_off_t inputBufCount_;
187 
189  unsigned char *outputBuf_;
190 
192  offile_off_t outputBufStart_;
193 
195  offile_off_t outputBufCount_;
196 
198  offile_off_t outputBufPutback_;
199 
201  OFBool padded_;
202 };
203 
204 #endif
205 #endif
206 
207 /*
208  * CVS/RCS Log:
209  * $Log: dcistrmz.h,v $
210  * Revision 1.5 2010-10-14 13:15:41 joergr
211  * Updated copyright header. Added reference to COPYRIGHT file.
212  *
213  * Revision 1.4 2008-06-23 12:09:13 joergr
214  * Fixed inconsistencies in Doxygen API documentation.
215  *
216  * Revision 1.3 2007/02/19 15:45:41 meichel
217  * Class DcmInputStream and related classes are now safe for use with
218  * large files (2 GBytes or more) if supported by compiler and operating system.
219  *
220  * Revision 1.2 2005/12/08 16:28:18 meichel
221  * Changed include path schema for all DCMTK header files
222  *
223  * Revision 1.1 2002/08/27 16:55:34 meichel
224  * Initial release of new DICOM I/O stream classes that add support for stream
225  * compression (deflated little endian explicit VR transfer syntax)
226  *
227  *
228  */
229 


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2