Fortran90 Interface: h5pset_shuffle_f
SUBROUTINE h5pset_shuffle_f(prp_id, hdferr)
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
! 0 on success and -1 on failure
END SUBROUTINE h5pset_shuffle_f
hid_tplist_id IN: Dataset creation property list identifier
H5P_SET_SHUFFLE sets the shuffle filter, H5Z_FILTER_SHUFFLE, in the dataset creation property list plist_id.
The shuffle filter de-interlaces a block of data by reordering the bytes. All the bytes from one consistent byte position of each data element are placed together in one block; all bytes from a second consistent byte position of each data element are placed together a second block; etc. For example, given three data elements of a 4-byte datatype stored as 012301230123, shuffling will re-order data as 000111222333. This can be a valuable step in an effective compression algorithm because the bytes in each byte position are often closely related to each other and putting them together can increase the compression ratio.
As implied above, the primary value of the shuffle filter lies in its coordinated use with a compression filter; it does not provide data compression when used alone. When the shuffle filter is applied to a dataset immediately prior to the use of a compression filter, the compression ratio achieved is often superior to that achieved by the use of a compression filter without the shuffle filter.
Returns a non-negative value if successful; otherwise returns a negative value.