Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize the compression support. #399

Merged
merged 29 commits into from
Nov 14, 2017
Merged

Finalize the compression support. #399

merged 29 commits into from
Nov 14, 2017

Conversation

DennisHeimbigner
Copy link
Collaborator

This pr finalizes the netcdf-c compression support.
It relies on the HDF5 capability to
dynamically load compression filters.
Note that a compression filter is just
a special case of a filter.

The primary user-visible changes are as follows:

  1. Add a standard header "netcdf_filter.h" that defines
    the necessary API extensions
  2. Modify ncgen to support two new special attributes
    "_Filter_ID" and "_Filter_Parameters" so that compression
    can be turned on when creating a file using ncgen.
  3. Add a detailed description of filtering support
    to the user's guide; see the file filters.md
  4. Add a test case directory for this: nc_test4/filter_test.
    It is fragile and a ./configure flags (-enable-filter-test)
    is defined (default disabled) to shut this off this test
    to avoid spurious 'make check' failures.

Note that the HDF5 documentation is not up-to-date, so
much of what is encoded here comes from examining the
actual code in the file H5PL.c in the HDF5 source code.

This relies on the HDF5 capability to
dynamically load compression filters.
Note that a compression filter is just
a subcase of filters.

The primary user-visible changes are as follows:
1. Add a standard header "netcdf_filter.h" that defines
   the necessary API extensions
2. Modify ncgen to support two new special attributes
   "_Filter_ID" and "_Filter_Parameters" so that compression
   can be turned on when creating a file using ncgen.
4. Add a detailed description of filtering support
   to the user's guide; see the file filters.md
5. Add a test case directory for this: nc_test4/filter_test.
   It is fragile and a ./configure flags (-enable-filter-test)
   is defined (default disabled) to shut this off this test
   to avoid spurious 'make check' failures.

Note that the HDF5 documentation is not up-to-date, so
much of what is encoded here comes from examining the
actual code in the file H5PL.c in the HDF5 source code.
1. Allow nccopy to apply filters, especially on the output file.
   This provides a third way to do this other than using ncgen or
   programatically
2. Make sure that even if the filter code is not available, it is
   possible to see the filter id and parameters for variables using
   e.g ncdump -hs.
3. Fix bug in nccopy so that the input file does
   not necessarily have to be netcdf-4.
4. At last minute decided to change to using a
   single "_Filter" attribute for ncgen
5. Added a test to tst_filter.sh to generate C code using ncgen.
@DennisHeimbigner
Copy link
Collaborator Author

Add new capabilities to filter code:

  1. Allow nccopy to apply filters, especially on the output file.
    This provides a third way to do this other than using ncgen or
    programmatically
  2. Make sure that even if the filter code is not available, it is
    possible to see the filter id and parameters for variables using
    e.g ncdump -hs.
  3. Fix bug in nccopy so that the input file does
    not necessarily have to be netcdf-4.
  4. At last minute decided to change to using a
    single "_Filter" attribute for ncgen
  5. Added a test to tst_filter.sh to generate C code using ncgen.

@WardF WardF added this to the 4.5.1 milestone Jul 6, 2017
@WardF WardF self-assigned this Jul 6, 2017
a linux variant system, I made some changes to (one hopes)
incorporate some improvements in documenting and building this test.
   to docs/filter.md
2. Moved location of filter.md in documentation
3. Add a template file as the basis for building new filters.
4. Did some test case cleanup
2. Factored out the parameter string parsing for ncgen and nccopy
   int libdispatch/dfilter.c + include/ncfilter.h
3. Allow a parameter string to use constant types other than
   unsigned int. See docs/filters.md for details.
4. Moved the old content of  include/netcdf_filter.h into include/netcdf.h
   and removed include/netcdf_filter.h as no longer needed.
5. Force the test filter (bzip2) in nc_test4/filter_test to
   be built using BUILT_SOURCES.
@WardF
Copy link
Member

WardF commented Nov 13, 2017

Working on this next; it has been open for a long time and needs merged. Will work on the conflicts.

@WardF WardF merged commit 365afca into master Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants