[
https://issues.apache.org/jira/browse/AVRO-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802160#action_12802160
]
Philip Zeyliger commented on AVRO-135:
--------------------------------------
Oy! So, the patch just uploaded is inconsistent: I thought I was doing 1951,
whereas it's doing 1950 (nowrap is not set). As far as I can tell, python's
zlib uses 1950 by default. Passing a negative argument to python's decompress
magically does the right thing, but oy.
{noformat}
[1]doorstop::~(29777)$python
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>> zlib.compress("foo")
'x\x9cK\xcb\xcf\x07\x00\x02\x82\x01E'
>>> a = zlib.compress("foo")
>>> b = a[2:-4]
>>> zlib.decompress(a)
'foo'
>>> zlib.decompress(b, -15)
'foo'
>>> zlib.decompress(b)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
zlib.error: Error -3 while decompressing data: incorrect header check
{noformat}
I'll upload a new patch which does set nowrap.
> add compression to data files
> -----------------------------
>
> Key: AVRO-135
> URL: https://issues.apache.org/jira/browse/AVRO-135
> Project: Avro
> Issue Type: New Feature
> Components: java, spec
> Reporter: Doug Cutting
> Assignee: Philip Zeyliger
> Priority: Blocker
> Fix For: 1.3.0
>
> Attachments: AVRO-135.patch.txt, AVRO-135.patch.txt
>
>
> We should add support for at least one compression codec to data files.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.