33 #if ! defined (octave_zfsstream_h) 34 #define octave_zfsstream_h 1 36 #include "octave-config.h" 38 #if defined (HAVE_ZLIB) 80 int comp_strategy = Z_DEFAULT_STRATEGY);
97 std::ios_base::openmode
mode);
107 std::ios_base::openmode
mode);
132 virtual std::streamsize
155 overflow (int_type
c = traits_type::eof ());
165 virtual std::streambuf*
184 seekoff (off_type off, std::ios_base::seekdir way,
185 std::ios_base::openmode
mode =
186 std::ios_base::in | std::ios_base::out);
194 seekpos (pos_type sp, std::ios_base::openmode
mode =
195 std::ios_base::in | std::ios_base::out);
291 std::ios_base::openmode
mode = std::ios_base::in);
300 std::ios_base::openmode
mode = std::ios_base::in);
330 std::ios_base::openmode
mode = std::ios_base::in);
342 std::ios_base::openmode
mode = std::ios_base::in);
378 std::ios_base::openmode
mode = std::ios_base::out);
387 std::ios_base::openmode
mode = std::ios_base::out);
417 std::ios_base::openmode
mode = std::ios_base::out);
429 std::ios_base::openmode
mode = std::ios_base::out);
452 template <
typename T1,
typename T2>
457 template <
typename Ta,
typename Tb>
485 template <
typename T1,
typename T2>
490 : func(
f), val1(v1), val2(
v2)
494 template <
typename T1,
typename T2>
496 operator<<(gzofstream& s, const gzomanip2<T1,T2>& m)
497 {
return (*m.func)(
s, m.val1, m.val2); }
gzofstream & setcompression(gzofstream &gzs, int l, int s=Z_DEFAULT_STRATEGY)
gzfilebuf * open(const char *name, std::ios_base::openmode mode)
Open gzipped file.
void attach(int fd, std::ios_base::openmode mode=std::ios_base::out)
Attach to already open gzipped file.
virtual pos_type seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out)
Alters the stream positions.
gzfilebuf sb
Underlying stream buffer.
void open(const char *name, std::ios_base::openmode mode=std::ios_base::in)
Open gzipped file.
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
Return the CPU time used by your Octave session The first output is the total time spent executing your process and is equal to the sum of second and third which are the number of CPU seconds spent executing in user mode and the number of CPU seconds spent executing in system mode
Gzipped file output stream manipulator class.
Gzipped file output stream class.
virtual std::streambuf * setbuf(char_type *p, std::streamsize n)
Installs external stream buffer.
void enable_buffer()
Allocate internal buffer.
friend gzofstream & operator<<(gzofstream &, const gzomanip2< Ta, Tb > &)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
virtual int_type overflow(int_type c=traits_type::eof())
Write put area to gzipped file.
int setcompression(int comp_level, int comp_strategy=Z_DEFAULT_STRATEGY)
Set compression level and strategy on the fly.
gzfilebuf * close()
Close gzipped file.
std::ios_base::openmode io_mode
Mode in which file was opened.
gzFile file
Underlying file pointer.
bool is_open() const
Check if file is open.
bool is_open()
Check if file is open.
nd deftypefn *std::string name
bool is_open()
Check if file is open.
virtual int_type pbackfail(int_type c=traits_type::eof())
Gzipped file stream buffer class.
void open(const char *name, std::ios_base::openmode mode=std::ios_base::out)
Open gzipped file.
gzfilebuf * rdbuf() const
Obtain underlying stream buffer.
bool own_buffer
True if this object owns stream buffer.
gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2), T1 v1, T2 v2)
void attach(int fd, std::ios_base::openmode mode=std::ios_base::in)
Attach to already open gzipped file.
void close()
Close gzipped file.
char_type * buffer
Stream buffer.
gzfilebuf * rdbuf() const
Obtain underlying stream buffer.
virtual pos_type seekpos(pos_type sp, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out)
Alters the stream positions.
gzfilebuf sb
Underlying stream buffer.
Gzipped file input stream class.
void disable_buffer()
Destroy internal buffer.
std::streamsize buffer_size
Stream buffer size.
const octave_char_matrix & v2
gzfilebuf * attach(int fd, std::ios_base::openmode mode)
Attach to already open gzipped file.
bool open_mode(std::ios_base::openmode mode, char *c_mode) const
Convert ios open mode int to mode string used by zlib.
virtual std::streamsize showmanyc()
Number of characters available in stream buffer.
virtual int sync()
Flush stream buffer to file.
bool own_fd
True if this object owns file descriptor.
gzfilebuf & operator=(const gzfilebuf &)=delete
void close()
Close gzipped file.
virtual int_type underflow()
Fill get area from gzipped file.