Hi Dominik,

2011/1/3, Dominik Szczerba <domi...@itis.ethz.ch>:
> Hi,
>
> I could not find a clear example how to create a compressed dataset. Could
> someone please point me in the right direction?
> Let's say I want to do something as simple as the below, only compressing
> the data using zlib, when required defining 1e6 chunk size.
>
>     f = tables.openFile(fname,"w")
>     f.createArray(f.root,"u",u)
>     f.createArray(f.root,"v",v)
>     f.createArray(f.root,"w",w)
>     f.close()

Array objects are non-chunked.  In order to use compression, you need
to use a CArray:

http://www.pytables.org/docs/manual/ch04.html#CArrayClassDescr

or an EArray (objects enlargeable on a certain dimension):

http://www.pytables.org/docs/manual/ch04.html#EArrayClassDescr

For choosing the desired chunksize, make use of the `chunkshape`
attribute in constructors (if not specified, a decent default will be
automatically chosen for you).

HTH,

-- 
Francesc Alted

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to