diff --git a/docs/conf.py b/docs/conf.py index fc0a6d73..f752fa81 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,9 +57,9 @@ # # The short X.Y version. import lz4 -version = lz4.version.version +version = lz4.__version__ # The full version, including alpha/beta/rc tags. -release = lz4.version.version +release = lz4.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -105,6 +105,9 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. #html_theme = 'sphinxdoc' +import sphinx_bootstrap_theme +html_theme = 'bootstrap' +html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 539db1e5..fdb14c1b 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -220,13 +220,13 @@ header adds an extra 8 bytes to the size of the compressed frame, but allows the decompression functions to better size memory buffers during decompression. If ``store_size`` is ``True`` the size of the uncompressed data will be stored in -the frame header for use during decompression. Default is ``True``. +the frame header. Default is ``True``. Availability of ``store_size``: :py:func:`lz4.frame.compress()` The ``source_size`` argument optionally specifies the uncompressed size of the source data to be compressed. If specified, the size will be stored in the frame -header for use during decompression. +header. Availability of ``source_size``: :py:meth:`lz4.frame.LZ4FrameCompressor.begin()`, :py:func:`lz4.frame.compress_begin()`, :py:func:`lz4.frame.open()`, diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..150a2570 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx >= 1.6.0 +sphinx_bootstrap_theme diff --git a/lz4/frame/__init__.py b/lz4/frame/__init__.py index 40962546..6c90dda2 100644 --- a/lz4/frame/__init__.py +++ b/lz4/frame/__init__.py @@ -21,11 +21,11 @@ class LZ4FrameCompressor(object): block_size (int): Sepcifies the maximum blocksize to use. Options: - - `lz4.frame.BLOCKSIZE_DEFAULT` or 0: the lz4 library default - - `lz4.frame.BLOCKSIZE_MAX64KB` or 4: 64 kB - - `lz4.frame.BLOCKSIZE_MAX256KB` or 5: 256 kB - - `lz4.frame.BLOCKSIZE_MAX1MB` or 6: 1 MB - - `lz4.frame.BLOCKSIZE_MAX4MB` or 7: 4 MB + - `lz4.frame.BLOCKSIZE_DEFAULT` or 0: the lz4 library default + - `lz4.frame.BLOCKSIZE_MAX64KB` or 4: 64 kB + - `lz4.frame.BLOCKSIZE_MAX256KB` or 5: 256 kB + - `lz4.frame.BLOCKSIZE_MAX1MB` or 6: 1 MB + - `lz4.frame.BLOCKSIZE_MAX4MB` or 7: 4 MB If unspecified, will default to `lz4.frame.BLOCKSIZE_DEFAULT` which is equal to `lz4.frame.BLOCKSIZE_MAX64KB`. @@ -40,9 +40,9 @@ class LZ4FrameCompressor(object): Values between 4-9 are recommended. 0 is the default. The following module constants are provided as a convenience: - - `lz4.frame.COMPRESSIONLEVEL_MIN`: Minimum compression (0) - - `lz4.frame.COMPRESSIONLEVEL_MINHC`: Minimum high-compression (3) - - `lz4.frame.COMPRESSIONLEVEL_MAX`: Maximum compression (16) + - `lz4.frame.COMPRESSIONLEVEL_MIN`: Minimum compression (0) + - `lz4.frame.COMPRESSIONLEVEL_MINHC`: Minimum high-compression (3) + - `lz4.frame.COMPRESSIONLEVEL_MAX`: Maximum compression (16) content_checksum (bool): Specifies whether to enable checksumming of the payload content. If ``True`` a checksum of the uncompressed data @@ -572,9 +572,9 @@ def seek(self, offset, whence=io.SEEK_SET): The new position is specified by ``offset``, relative to the position indicated by ``whence``. Possible values for ``whence`` are: - io.SEEK_SET or 0: start of stream (default): offset must not be negative - io.SEEK_CUR or 1: current stream position - io.SEEK_END or 2: end of stream; offset must not be positive + - io.SEEK_SET or 0: start of stream (default): offset must not be negative + - io.SEEK_CUR or 1: current stream position + - io.SEEK_END or 2: end of stream; offset must not be positive Returns the new file position. @@ -631,10 +631,10 @@ def open(filename, mode="rb", ``'x'``, ``'xb'``, ``'a'``, or ``'ab'`` for binary mode, or ``'rt'``, ``'wt'``, ``'xt'``, or ``'at'`` for text mode. - For binary mode, this function is equivalent to the ``LZ4FrameFile`` - constructor: ``LZ4FrameFile(filename, mode, ...)``. + For binary mode, this function is equivalent to the `LZ4FrameFile` + constructor: `LZ4FrameFile(filename, mode, ...)`. - For text mode, an ``LZ4FFile`` object is created, and wrapped in an + For text mode, an `LZ4FrameFile` object is created, and wrapped in an ``io.TextIOWrapper`` instance with the specified encoding, error handling behavior, and line ending(s). @@ -668,6 +668,7 @@ def open(filename, mode="rb", `lz4.frame.LZ4FrameCompressor`. auto_flush (bool): Compressor setting. See `lz4.frame.LZ4FrameCompressor`. + """ if "t" in mode: if "b" in mode: diff --git a/requirements.txt b/requirements.txt index 4c4fc4dd..dff7e4c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -sphinx >= 1.4.8 tox pytest setuptools_scm