33 #if ! defined (octave_zfsstream_h)
34 #define octave_zfsstream_h 1
36 #include "octave-config.h"
38 #if defined (HAVE_ZLIB)
75 int comp_strategy = Z_DEFAULT_STRATEGY);
92 std::ios_base::openmode
mode);
102 std::ios_base::openmode
mode);
127 virtual std::streamsize
150 overflow (int_type
c = traits_type::eof ());
160 virtual std::streambuf*
179 seekoff (off_type off, std::ios_base::seekdir way,
180 std::ios_base::openmode
mode =
181 std::ios_base::in | std::ios_base::out);
189 seekpos (pos_type sp, std::ios_base::openmode
mode =
190 std::ios_base::in | std::ios_base::out);
292 std::ios_base::openmode
mode = std::ios_base::in);
301 std::ios_base::openmode
mode = std::ios_base::in);
330 open (
const char* name,
331 std::ios_base::openmode
mode = std::ios_base::in);
343 std::ios_base::openmode
mode = std::ios_base::in);
379 std::ios_base::openmode
mode = std::ios_base::out);
388 std::ios_base::openmode
mode = std::ios_base::out);
417 open (
const char* name,
418 std::ios_base::openmode
mode = std::ios_base::out);
430 std::ios_base::openmode
mode = std::ios_base::out);
453 template <
typename T1,
typename T2>
458 template <
typename Ta,
typename Tb>
481 (gzs.
rdbuf ())->setcompression (l,
s);
486 template <
typename T1,
typename T2>
491 : func(
f), val1(v1), val2(v2)
495 template <
typename T1,
typename T2>
497 operator<<(gzofstream& s, const gzomanip2<T1,T2>&
m)
498 {
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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &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.
gzfilebuf & operator=(const gzfilebuf &)
void enable_buffer()
Allocate internal buffer.
gzfilebuf * rdbuf() const
Obtain underlying stream buffer.
friend gzofstream & operator<<(gzofstream &, const gzomanip2< Ta, Tb > &)
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.
gzfilebuf * rdbuf() const
Obtain underlying stream buffer.
bool is_open()
Check if file is open.
bool is_open()
Check if file is open.
virtual int_type pbackfail(int_type c=traits_type::eof())
Gzipped file stream buffer class.
nd deftypefn *octave_map m
void open(const char *name, std::ios_base::openmode mode=std::ios_base::out)
Open gzipped file.
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.
bool open_mode(std::ios_base::openmode mode, char *c_mode) const
Convert ios open mode int to mode string used by zlib.
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
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.
bool is_open() const
Check if file is open.
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.
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.
void close()
Close gzipped file.
virtual int_type underflow()
Fill get area from gzipped file.