Open
Description
Describe the bug
I have been playing with h5repack
in the context of user-defined filters (e.g. passing -f <list of objects>:<name of filter>=<filter parameters>
) and have run across a number of issues which I briefly enumerate here.
Use of colon character
- When no specific objects are listed ahead of the colon character (
:
) in the argument to the-f
option, is the colon character still needed? I think it is unclear in the documentation whether it is or not. I would recommend that it work in this circumstance either way. Then, you don't have to worry about making documentation any clearer. So, if no specific objects are listed ahead of the colon, both-f :UD=XXXXX,...
and-f UD=XXXXXX,...
should both work.
Handling of cd_value_count
for UD=
filters
- For a
UD
filter with no params (e.g.cd_vals
), is a0
still nonetheless needed for thecd_value_count
parameter. This does seem to work either way. That is good. - If you specify a
cd_value_count
ofK
and provide fewer thanK
values, this is caught as an error andh5repack
does not proceed. This is also good. The reverse is not, however, true. If you specify acd_value_count
of zero but provide more values, no error is generated and, indeed, the resulting repacked datasets show those extra values as part of the filter parameters.
When filter_flag
is 1
(mandatory)
- When a specific object is listed ahead of the colon character and the
filter_flag
is1
indicating the filter is mandatory, then if thecan_apply
for the associated filter returns anything other than 1 for that object, that should be treated as an outright error byh5repack
. An error message should be printed and the return value fromh5repack
should not be0
. - When the requested filter ID is not succesfully loaded (e.g. after all
dlopen()
calls there is nothing found matching the specified filter ID) andfilter_flag
is1
indicating the filter is *mandatory, that should be treated as an outright error byh5repack
. An error message should be printed and the return value fromh5repack
should not be0
.
A stub filter I was using to test is foo.c.gz
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To be triaged