summary refs log tree commit diff
path: root/bin/cash/libedit/parse.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-02-05 02:07:53 -0500
committerJune McEnroe <june@causal.agency>2019-02-05 02:07:53 -0500
commit0752287a116694752c414e247c1c327d17298f32 (patch)
tree3703a25f04063b497d9e12158fb47e3a53ae34e7 /bin/cash/libedit/parse.h
parentSet nvim Directory back to blue (diff)
downloadsrc-0752287a116694752c414e247c1c327d17298f32.tar.gz
src-0752287a116694752c414e247c1c327d17298f32.zip
Add aes
Okay this should really be aes(6) but I don't feel like adding back MAN6
in the Makefile.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
>113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
.Dd January 15, 2017
.Dt DEFLATESETHEADER 3
.Os
.
.Sh NAME
.Nm deflateSetHeader
.Nd set gzip header
.
.Sh LIBRARY
.Lb libz
.
.Sh SYNOPSIS
.In zlib.h
.
.Bd -literal
typedef struct gz_header_s {
	int     text;
	uLong   time;
	int     xflags;
	int     os;
	Bytef   *extra;
	uInt    extra_len;
	uInt    extra_max;
	Bytef   *name;
	uInt    name_max;
	Bytef   *comment;
	uInt    comm_max;
	int     hcrc;
	int     done;
} gz_header;
.Ed
.
.Pp
.Vt typedef gz_header FAR *gz_headerp;
.
.Ft int
.Fn deflateSetHeader "z_streamp strm" "gz_headerp head"
.
.Sh DESCRIPTION
.Fn deflateSetHeader
provides gzip header information
for when a gzip stream
is requested by
.Xr deflateInit2 3 .
.Fn deflateSetHeader
may be called after
.Xr deflateInit2 3
or
.Xr deflateReset 3
and before the first call of
.Xr deflate 3 .
The
text,
time,
OS,
extra field,
name,
and comment
information in the provided
.Vt gz_header
structure
are written to the gzip header
.Po
.Fa xflag
is ignored \(em
the extra flags are set
according to the compression level
.Pc .
The caller must assure that,
if not
.Dv Z_NULL ,
.Fa name
and
.Fa comment
are terminated with a zero byte,
and that if
.Fa extra
is not
.Dv Z_NULL ,
that
.Fa extra_len
bytes are available there.
If
.Fa hcrc
is true,
a gzip header CRC is included.
Note that the current versions
of the command-line version of
.Xr gzip 1
(up through version 1.3.x)
do not support header CRCs,
and will report that it is a
"multi-part gzip file"
and give up.
.
.Pp
If
.Fn deflateSetHeader
is not used,
the default gzip header has
text false,
the time set to zero,
and OS set to 255,
with no extra, name, or comment fields.
The gzip header is returned
to the default state by
.Xr deflateReset 3 .
.
.Pp
The fields of
.Vt gz_header
are as follows:
.
.Bl -tag -width "extra_len"
.It Fa text
true if compressed data believed to be text
.It Fa time
modification time
.It Fa xflags
extra flags
(not used when writing a gzip file)
.It Fa os
operating system
.It Fa extra
pointer to extra field or
.Dv Z_NULL
if none
.It Fa extra_len
extra field length
.Po
valid if
.Fa extra
!=
.Dv Z_NULL
.Pc
.It Fa extra_max
space at extra
(only when reading header)
.It Fa name
pointer to zero-terminated file name or
.Dv Z_NULL
.It Fa name_max
space at
.Fa name
(only when reading header)
.It Fa comment
pointer to zero-terminated comment or
.Dv Z_NULL
.It Fa comm_max
space at comment
(only when reading header)
.It Fa hcrc
true if there was or will be a header CRC
.It Fa done
true when done reading gzip header
(not used when writing a gzip file)
.El
.
.Sh RETURN VALUES
.Fn deflateSetHeader
returns
.Dv Z_OK
if success,
or
.Dv Z_STREAM_ERROR
if the source stream state was inconsistent.
.
.Sh SEE ALSO
.Xr gzip 1 ,
.Xr deflateInit2 3
.
.Sh HISTORY
This manual page was converted from
.In zlib.h
to mdoc format by
.An June McEnroe Aq Mt june@causal.agency .
.
.Sh AUTHORS
.An Jean-loup Gailly Aq Mt jloup@gzip.org
.An Mark Adler Aq Mt madler@alumni.caltech.edu