[h5py] 231/455: Update docs for standalone LZF filter
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.
commit cecdba98f2c592f743103d2039097e528d6d2673
Author: andrewcollette <andrew.collette at gmail.com>
Date: Mon Feb 16 00:44:41 2009 +0000
Update docs for standalone LZF filter
---
lzf/README.txt | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
lzf/example.c | 22 ++++---------------
2 files changed, 72 insertions(+), 18 deletions(-)
diff --git a/lzf/README.txt b/lzf/README.txt
new file mode 100644
index 0000000..1da33bd
--- /dev/null
+++ b/lzf/README.txt
@@ -0,0 +1,68 @@
+===============================
+LZF filter for HDF5, revision 1
+===============================
+
+The LZF filter provides high-speed compression with acceptable compression
+performance, resulting in much faster performance than DEFLATE, at the
+cost of a slightly worse compression ratio. It's appropriate for large
+datasets of low to moderate complexity, for which some compression is
+much better than none, but for which the speed of DEFLATE is unacceptable.
+
+Both HDF5 versions 1.6 and 1.8 are supported.
+
+
+Using the filter from HDF5
+--------------------------
+
+There is exactly one new public function declared in lzf_filter.h, with
+the following signature:
+
+ int register_lzf(void)
+
+Calling this will register the filter with the HDF5 library. A non-negative
+return value indicates success. If the registration fails, an error is pushed
+onto the current error stack and a negative value is returned.
+
+It's strongly recommended to use the SHUFFLE filter with LZF, as it's
+cheap, supported by all current versions of HDF5, and can significantly
+improve the compression ratio. An example C program ("example.c") is included
+which demonstrates the proper use of the filter.
+
+
+Compiling
+---------
+
+The filter consists of a single .c file and header, along with an embedded
+version of the LZF compression library. Since the filter is stateless, it's
+recommended to statically link the entire thing into your program; for
+example:
+
+ $ gcc -O2 -lhdf5 lzf/*.c lzf_filter.c myprog.c -o myprog
+
+It can also be built as a shared library, although you will have to install
+the resulting library somewhere the runtime linker can find it:
+
+ $ gcc -02 -lhdf5 -fPIC -shared lzf/*.c lzf_filter.c -o liblzf_filter.so
+
+This filter has not been tested with C++ code. As in these examples, using
+option -O1 or higher is strongly recommended for increased performance.
+
+
+Contact
+-------
+
+This filter is maintained as part of the HDF5 for Python (h5py) project. The
+goal of h5py is to provide access to the majority of the HDF5 C API and feature
+set from Python.
+
+* Downloads and bug tracker: http://h5py.googlecode.com
+
+* Main web site and documentation: http://h5py.alfven.org
+
+* Contact email: h5py at alfven dot org
+
+
+
+
+
+
diff --git a/lzf/example.c b/lzf/example.c
index 9dda5a2..23dd776 100644
--- a/lzf/example.c
+++ b/lzf/example.c
@@ -5,21 +5,6 @@
Example program demonstrating use of the LZF filter from C code.
- The LZF filter provides high-speed compression with acceptable compression
- performance, resulting in much faster performance than DEFLATE, at the
- cost of a slightly worse compression ratio. It's appropriate for large
- datasets of low to moderate complexity, for which some compression is
- much better than none, but for which the speed of DEFLATE is unacceptable.
-
- It's recommended to use the SHUFFLE filter with LZF, as it's virtually
- free, supported by all current versions of HDF5, and can significantly
- improve the compression ratio.
-
- The filter is completely stateless, and so is safe to statically
- link into the final program if desired. Using gcc with option -O1
- or higher is recommended. The filter can be built with either HDF5
- 1.6 or 1.8, regardless of the HDF5 API compatibility macro settings.
-
To compile this program:
h5cc -DH5_USE_16_API lzf/*.c lzf_filter.c example.c -o example
@@ -27,16 +12,17 @@
To run:
$ ./example
+ Success!
$ h5ls -v test_lzf.hdf5
Opened "test_lzf.hdf5" with sec2 driver.
dset Dataset {100/100, 100/100, 100/100}
Location: 0:1:0:976
Links: 1
- Modified: 2009-01-28 21:51:20 PST
+ Modified: 2009-02-15 16:35:11 PST
Chunks: {1, 100, 100} 40000 bytes
- Storage: 4000000 logical bytes, 529745 allocated bytes, 755.08% utilization
+ Storage: 4000000 logical bytes, 174288 allocated bytes, 2295.05% utilization
Filter-0: shuffle-2 OPT {4}
- Filter-1: lzf-32000 OPT {1, 261, 0}
+ Filter-1: lzf-32000 OPT {1, 261, 40000}
Type: native float
*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git
More information about the debian-science-commits
mailing list