nbdkit-gzip-filter - Man Page
decompress a .gz file
Synopsis
nbdkit file --filter=gzip FILENAME.gz
Description
nbdkit-gzip-filter
is a filter for nbdkit(1) which transparently decompresses a gzip-compressed file. You can place this filter on top of nbdkit-file-plugin(1) to decompress a local .gz file, or on top of other plugins such as nbdkit-curl-plugin(1):
nbdkit curl --filter=gzip https://example.com/disk.gz
With nbdkit-tar-filter(1) it can be used to extract files from a compressed tar file:
nbdkit curl --filter=tar --filter=gzip \ https://example.com/file.tar.gz tar-entry=disk.img
The filter only allows read-only connections.
Note that gzip files are not very good for random access in large files because seeking to a position in the gzip file involves decompressing all data before that point in the file. A more practical method to compress large disk images is to use xz(1) or plzip(1). Both nbdkit-xz-filter(1) and nbdkit-lzip-filter(1) support block-level decompression if the file was compressed using the right options.
To allow seeking this filter has to keep the contents of the complete uncompressed file, which it does in a hidden temporary file under $TMPDIR
.
Parameters
There are no parameters specific to this plugin.
Environment Variables
- TMPDIR
Because the gzip format is not seekable, this filter has to store the complete contents of the compressed file in a temporary file located in /var/tmp by default. You can override this location by setting the
TMPDIR
environment variable before starting nbdkit.
Files
- $filterdir/nbdkit-gzip-filter.so
The plugin.
Use
nbdkit --dump-config
to find the location of$filterdir
.
Version
nbdkit-gzip-filter
first appeared in nbdkit 1.22. It is derived from nbdkit-gzip-plugin
which first appeared in nbdkit 1.0.
See Also
nbdkit-bzip2-filter(1), nbdkit-curl-plugin(1), nbdkit-file-plugin(1), nbdkit-lzip-filter(1), nbdkit-tar-filter(1), nbdkit-xz-filter(1), nbdkit(1), nbdkit-plugin(3).
Authors
Richard W.M. Jones
Copyright
Copyright Red Hat
License
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Referenced By
nbdkit(1), nbdkit-bzip2-filter(1), nbdkit-filter(3), nbdkit-lzip-filter(1), nbdkit-release-notes-1.22(1), nbdkit-release-notes-1.26(1), nbdkit-tar-filter(1), nbdkit-xz-filter(1).