=========================================================================== Associate a gzFile with the file descriptor fd. fd is not dup'ed here to mimic the behavio(u)r of fdopen. */
(fd, mode)
| 222 | to mimic the behavio(u)r of fdopen. |
| 223 | */ |
| 224 | gzFile ZEXPORT gzdopen (fd, mode) |
| 225 | int fd; |
| 226 | const char *mode; |
| 227 | { |
| 228 | char name[46]; /* allow for up to 128-bit integers */ |
| 229 | |
| 230 | if (fd < 0) return (gzFile)Z_NULL; |
| 231 | sprintf(name, "<fd:%d>", fd); /* for debugging */ |
| 232 | |
| 233 | return gz_open (name, mode, fd); |
| 234 | } |
| 235 | |
| 236 | /* =========================================================================== |
| 237 | * Update the compression level and strategy |