jason at acm.org
2008-Jan-30 08:11 UTC
[Rd] [rfc] Package to access the internal zlib library.
To make R.matlab's readMat work for me[1] I needed access to zlib's uncompress function. R already links with zlib, and sometime last year I hobbled together a quick package to get at a few functions. It's my first package, so I would love feedback both on the package and its purpose. I've dropped a temporary copy at http://jriedy.users.sonic.net/internalzlib_0.1.tar.gz Could someone with Windows and knowledge of how to decypher Windows problems test if it works for them? I still need to try AIX as well. Jason Footnotes: [1] I'm cleaning patches to send to the author shortly. I think I have readMat working for compressed data, UTF-*, and sparse matrices now.
Prof Brian Ripley
2008-Jan-30 09:20 UTC
[Rd] [rfc] Package to access the internal zlib library.
On Wed, 30 Jan 2008, jason at acm.org wrote:> To make R.matlab's readMat work for me[1] I needed access to zlib's > uncompress function. R already links with zlib, and sometime lastNot so: R can be linked to the system's zlib, and otherwise uses its own copy which is not intended for use by packages. Please check what 'Writing R Extensions' says about using undocumented entry points in R. Ideally none of zlib would be visible, but some packages have been making use of undocumented entry points and we took pity on them. Your package will not work as it does not include the header zlib.h, and e.g. Windows does not have it. Expecting the system's zlib.h to work with R's internal copy is unsafe. The *only* safe thing to do is to include your own copy of zlib, and compile it into the package (optionally linking instead to the system copy if it exists).> year I hobbled together a quick package to get at a few functions. > It's my first package, so I would love feedback both on the package > and its purpose. > > I've dropped a temporary copy at > http://jriedy.users.sonic.net/internalzlib_0.1.tar.gz > > Could someone with Windows and knowledge of how to decypher Windows > problems test if it works for them? I still need to try AIX as well.Please note that Uwe Ligges provides a Windows testing service: see 'Writing R Extensions' and the R-admin manual. You don't need to ask others to do this for you.> > Jason > > Footnotes: > [1] I'm cleaning patches to send to the author shortly. I think > I have readMat working for compressed data, UTF-*, and sparse > matrices now.-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Duncan Temple Lang
2008-Jan-30 09:23 UTC
[Rd] [rfc] Package to access the internal zlib library.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 There is also the Rcompression library from www.omegahat.org/Rcompression and directly available via install.packages() from the www.omegahat.org/R repository. This deals with various compression schemes and does things in memory. Hopefully there isn't much overlap and the two might be complementary. ~ D. jason at acm.org wrote: | To make R.matlab's readMat work for me[1] I needed access to zlib's | uncompress function. R already links with zlib, and sometime last | year I hobbled together a quick package to get at a few functions. | It's my first package, so I would love feedback both on the package | and its purpose. | | I've dropped a temporary copy at | http://jriedy.users.sonic.net/internalzlib_0.1.tar.gz | | Could someone with Windows and knowledge of how to decypher Windows | problems test if it works for them? I still need to try AIX as well. | | Jason | | Footnotes: | [1] I'm cleaning patches to send to the author shortly. I think | I have readMat working for compressed data, UTF-*, and sparse | matrices now. | | ______________________________________________ | R-devel at r-project.org mailing list | https://stat.ethz.ch/mailman/listinfo/r-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHoEH69p/Jzwa2QP4RAhbxAJ0e9KiZVrVlnSh14buN0YO0Ig15VACdF+U/ A+TrOmBEOqKpzBY7RTNBXms=6IGF -----END PGP SIGNATURE-----