A Tuesday 07 September 2010 15:00:10 Kim Hansen escrigué:
> Hi pytables-users,
> 
> The lzo algorithm site
> 
> http://www.oberhumer.com/opensource/lzo/
> 
> does not maintain any lzo binaries for download on Windows
> 
> However, thanks to Francesc Alted, such binaries are available indirectly
>  as a compression library for use with the pytables filters.
> 
> http://www.pytables.org/moin/FAQ#A.5BWindows.5DCan.27tfindLZObinariesforWin
> dows
> 
> I have the need for LZO decompressing bytestrings or streams on a Windows
>  OS decoupled from HDF5 files.
> 
> I cannot figure out how to make something like Python-LZO 1.08 (last
>  release in 2002!) work on a windows system as a standalone module (It
>  would be a very large personal barrier to C compile anything on that OS),
>  and I was therefore wondering if I could use some kind of internal hook, a
>  convenience or utility method in a pytables module to do a
> 
> "decompressed_byte_str = lzo.decompress(lzocompressed_byte_str, opts)"??
> 
> I have spend some time looking around in the pytables Python code, e.g.,
>  the filters module, but did not manage to find anything usefull.

PyTables uses HDF5 machinery for hooking LZO calls, so I had no need to wrap 
it for Python.  But, by using Cython [1], wrapping the next call (the one that 
I'm using in PyTables, see the complete sources in src/H5Zlzo.c)):

status = lzo1x_decompress_safe(*buf, nbytes, outbuf, &out_len, NULL);

and linking against the above binary libraries would be pretty simple.

[1] http://www.cython.org/

Hope this helps,

-- 
Francesc Alted

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to