"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Libtmp/Compression/compression.pd" between
PDL-2.074.tar.gz and PDL-2.075.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

compression.pd  (PDL-2.074):compression.pd  (PDL-2.075)
skipping to change at line 15 skipping to change at line 15
pp_addpm({At=>'Top'},<<'EOD'); pp_addpm({At=>'Top'},<<'EOD');
=head1 NAME =head1 NAME
PDL::Compression - compression utilities PDL::Compression - compression utilities
=head1 DESCRIPTION =head1 DESCRIPTION
These routines generally accept some data as a PDL and compress it These routines generally accept some data as a PDL and compress it
into a smaller PDL. Algorithms typically work on a single dimension into a smaller PDL. Algorithms typically work on a single dimension
and thread over other dimensions, producing a threaded table of and broadcast over other dimensions, producing a broadcasted table of
compressed values if more than one dimension is fed in. compressed values if more than one dimension is fed in.
The Rice algorithm, in particular, is designed to be identical to the The Rice algorithm, in particular, is designed to be identical to the
RICE_1 algorithm used in internal FITS-file compression (see PDL::IO::FITS). RICE_1 algorithm used in internal FITS-file compression (see PDL::IO::FITS).
=head1 SYNOPSIS =head1 SYNOPSIS
use PDL::Compression use PDL::Compression
($y,$xsize) = $x->rice_compress(); ($y,$xsize) = $x->rice_compress();
skipping to change at line 96 skipping to change at line 96
OtherPars => "int blocksize", # in OtherPars to avoid autopromotion OtherPars => "int blocksize", # in OtherPars to avoid autopromotion
GenericTypes =>['B','S','US','L'], GenericTypes =>['B','S','US','L'],
Doc => <<'EOD', Doc => <<'EOD',
=for ref =for ref
Squishes an input PDL along the 0 dimension by Rice compression. In Squishes an input PDL along the 0 dimension by Rice compression. In
scalar context, you get back only the compressed PDL; in list context, scalar context, you get back only the compressed PDL; in list context,
you also get back ancillary information that is required to uncompress you also get back ancillary information that is required to uncompress
the data with rice_uncompress. the data with rice_uncompress.
Multidimensional data are threaded over - each row is compressed Multidimensional data are broadcasted over - each row is compressed
separately, and the returned PDL is squished to the maximum compressed separately, and the returned PDL is squished to the maximum compressed
size of any row. If any of the streams could not be compressed (the size of any row. If any of the streams could not be compressed (the
algorithm produced longer output), the corresponding length is set to -1 algorithm produced longer output), the corresponding length is set to -1
and the row is treated as if it had length 0. and the row is treated as if it had length 0.
Rice compression only works on integer data types -- if you have Rice compression only works on integer data types -- if you have
floating point data you must first quantize them. floating point data you must first quantize them.
The underlying algorithm is identical to the Rice compressor used in The underlying algorithm is identical to the Rice compressor used in
CFITSIO (and is used by PDL::IO::FITS to load and save compressed FITS CFITSIO (and is used by PDL::IO::FITS to load and save compressed FITS
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)