Displaying 1 result from an estimated 1 matches for "r_compress1".
Did you mean:
r_compress3
2007 Feb 16
0
R_decompress1 and zlib
....
Interestingly, when I generate some test-data, compress it, write it to a
file, read it from the file and decompress it, it works fine:
> t <- round(abs(rnorm(1000)), digits = 2)
> t.asc <- paste(t, collapse = ' ')
> t.raw <- charToRaw(t.asc)
> t.comp <- .Call('R_compress1', t.raw)
> ## write to file
> zz <- file('test.file', 'wb')
> writeBin(t.comp, zz)
> close(zz)
> ## read from file
> zz <- file('test.file', 'rb')
> comp.in <- readBin(zz, raw(), 1e6)
> close(zz)
> t.decomp <- .Call('R_d...