From 77a0af6934421b9003857dc25391f9e363fd5a4b Mon Sep 17 00:00:00 2001 From: Addison Elliott Date: Tue, 2 Apr 2019 11:10:29 -0500 Subject: [PATCH] Remove documentation regarding compression_level=0 (#91) The GZIP library supports a compression level of `0` for no compression but this has been found to be slower than setting the encoding to `raw`. This PR removes documentation for setting `compression_level=0`. In addition, `bz2` in Python does not support a compression level of 0. Another benefit of this PR is the unified compression level range. Note that the user can still specify a compression level of 0 at their own risk. Fixes issue #88 --- nrrd/writer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nrrd/writer.py b/nrrd/writer.py index 4897560..bcb0333 100644 --- a/nrrd/writer.py +++ b/nrrd/writer.py @@ -132,9 +132,9 @@ def write(filename, data, header=None, detached_header=False, relative_data_path Dictionary used for parsing custom field types where the key is the custom field name and the value is a string identifying datatype for the custom field. compression_level : :class:`int` - Int specifying compression level, when using a compressed encoding (.gz, .bz2). - - For zlib (.gz): 1-9 set low to high compression; 0 disables; -1 uses zlib default. - - For bzip2 (.bz2): 1-9 set low to high compression. + Integer between 1 to 9 specifying the compression level when using a compressed encoding (gzip or bzip). A value + of :obj:`1` compresses the data the least amount and is the fastest, while a value of :obj:`9` compresses the + data the most and is the slowest. See Also --------