[
https://issues.apache.org/jira/browse/AVRO-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802146#action_12802146
]
Scott Carey commented on AVRO-135:
----------------------------------
bq. Do you know what Java library implements 1950? Java's docs are confusing as
ever here (at least to me).
The same Deflator class, it is a constructor flag -- 'boolean nowrap'.
http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/Deflater.html
Specifying wrapped or not wrapped is the same process as compression level --
construct the Deflator and pass it in to the DeflatorOutputStream constructor..
Or, the Deflator class can be used 'raw' without an output stream on byte
arrays. The source code for DeflatorOutputStream is instructive for this if it
is necessary. Codecs could be defined to function on byte[] rather than
input/output streams.
If I recall correctly, I had to decipher manually that 'nowrap' was indeed just
rfc1950 with the header/footer removed --- a.k.a. rfc1951 -- because the
documentation doesn't say much. I was doing this for a servlet compression
filter which has to know that some browser user-agents only accept ZLIB
('nowrap = false') when they claim to support "Content-Encoding: deflate", and
others mean bare deflate ('nowrap = true'). HTTP spec doesn't specify. Avro
won't make that mistake.
> 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.