BTW, comp and ucomp are inverse functions and also allow to compress to a file:
a =. comp i.1000 NB. compress i.1000 ucomp a NB. decompress (<'/tmp/a') comp i.1000 NB. compress to file ucomp (<'/tmp/a') NB. decompress from file On Sun, May 31, 2009 at 9:44 AM, Matthew Brand <[email protected]> wrote: > Package zbuffer on 64-bit Ubuntu does not run "out-of-the-box" (for me > it doesn't). > > 1. Need to change line 19 of zbuffer.ijs to: > libf=. libp{:: 'zlibapi'; 'libzlib'; 'zlibwapi';'' > libf=. libp{:: 'zlibapi64'; 'libzlib'; 'zlibwapi';'' > > however.... > > 2. The library shipped does not contain the uncompress function: > m...@mb-laptop:~/j64-602/addons/arc/zip/lib$ nm zlibapi.so | grep uncomp > m...@mb-laptop:~/j64-602/addons/arc/zip/lib$ nm zlibapi64.so | grep uncomp > m...@mb-laptop:~/j64-602/addons/arc/zip/lib$ nm /usr/local/lib/libz.so | > grep uncomp > 0000000000004b90 T uncompress > > Therefore I change line 21 of zbuffer.ijs to: > LIB=: jpath ADDONDIR,'lib/',libf,'.',libe > LIB =: '/usr/local/lib/libz.so' > > And the following works: > load 'arc/zip/zbuffer' > comp =: 3!:1@(#;zput)@(3!:1) : ( c...@] (1!:2) [) NB. > compress anything. > ucomp =: 3!:2@(0&{:: zget (1&{::))@(3!:2)`(ucomp@(1!:1))@.(32&=@(3!:0)) > > ucomp comp i.10 > 0 1 2 3 4 5 6 7 8 9 > > I do not understand why "libz" and "zlib" are used interchangeably but > they appear to be meant to be the same thing. > > Does anybody else with 64-bit Linux have this problem? > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
