[ 
https://issues.apache.org/jira/browse/AVRO-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169049#comment-13169049
 ] 

Michael Cooper commented on AVRO-957:
-------------------------------------

Hi Douglas,

I have just fixed up those things.
* It now checks if the buffer length is already big enough before using realloc.
* Improved error messages.
 ** Set the error message when deflate breaks
 ** Set the error message when codec is not known
 ** Return 1(error) when avro_codec_* cannot determine the codec.
 ** Show the error messages in quickstop for debugging.
* The cmake changes you sent did not work right out of the box for me, the 
package names were different (case sensitive?).
 ** zlib -> ZLIB
 ** pkgconfig -> PkgConfig
* The CODEC_LIB variable was renamed, but it was still used elsewhere. Turns 
out that its not needed now that you added target_link_libraries.
* Fixed whitespace issues


One thing I'm not sure about is in encode_deflate, where apparently deflate() 
resizes the buffer?

I have closed and re-opened the pull request with the new branch.
I will attach the patch shortly.
                
> Added Codec Support to Avro-C
> -----------------------------
>
>                 Key: AVRO-957
>                 URL: https://issues.apache.org/jira/browse/AVRO-957
>             Project: Avro
>          Issue Type: New Feature
>          Components: c
>            Reporter: Lucas Martin-King
>              Labels: c, codec, deflate
>         Attachments: 0001-Use-builtin-CMake-logic-to-find-zlib-and-lzma.patch
>
>
> We (Experian Hitwise) have added codec support to avro-c (as per the avro 
> spec), with preliminary deflate/inflate support (as well as null codec 
> support).
> This changes the way blocks are written to the file, with the block data 
> being passed through the codec interface, before being written to file.
> This also changes the way blocks are read from a file, with the block data 
> first being read into a buffer, before being passed through the codec 
> interface, then a memory reader is set to the decoded data, which is read by 
> the user calls avro_file_reader_read_value() and avro_file_reader_read()
> Please feel free to make changes, as although I did try to emulate the coding 
> style of the rest of the avro c library, there may be things I've done 
> "differently" :-)
> Code is available from Github:  https://github.com/hitwise/avro  (branch: 
> codec)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to