crunch, array, byte_slice, out
Tries to compress
array and writes the result in array
out, which must be predefined and large enough to contain
byte_slice specifies how many bits per number
are passed to
out without compression. If
byte_slice is too small or too large, then less efficient
compression or even expansion may occur. Try three less than the
array’s entropy for
Presently, only compression of
word, and (on some
long arrays is supported. Associated system variables
the last specified
the number of bits the last compressed array needed.
the number of bits per compressed element for the last compressed array.
out has insufficient room to hold the result, then
!crunch_bpp are set to 0. The subroutine
form then also generates an error; the function form does not, but
returns a 0. If there is sufficient room, then the function form
returns a 1. If other errors occur (e.g., when
not a numerical array), then both forms generate error states.
See also: !crunch_bits, !crunch_bpp, !crunch_slice