Skip to content

Commit

Permalink
Remove documentation regarding compression_level=0 (#91)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
addisonElliott authored Apr 2, 2019
1 parent 16be776 commit 77a0af6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nrrd/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down

0 comments on commit 77a0af6

Please sign in to comment.