Comments (11)
Original comment by [email protected]
on 30 Mar 2011 at 8:26
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from snappy.
Hi,
Sounds like a good idea. Do you want to contribute a patch? All you should need
is a new .h/.cc file pair with the bindings, and some minor changes to
Makefile.am to compile the .cc file and install the .h file.
Original comment by [email protected]
on 2 Apr 2011 at 7:31
- Changed state: Accepted
from snappy.
Here's a patch that adds the following C wrapper functions:
snappy_compress
snappy_uncompress
snappy_max_compressed_length
snappy_uncompressed_length
snappy_is_valid_compressed_buffer
Original comment by [email protected]
on 3 Apr 2011 at 2:23
Attachments:
from snappy.
Thanks! This generally looks good. A few comments:
* Please try to follow the C++ coding style used in Snappy, even though these
are C bindings. You can find a copy of the Google C++ style guide at
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml .
* You'll need comments; a file comment for each file, and a function comment
for each function in the .h file.
* There's no license attached to the files; I'll need to talk to the open
source people exactly how we're handling external patches, but to include it in
the distribution we'll need to have it licensed under the same BSD license as
the rest of Snappy.
Original comment by [email protected]
on 3 Apr 2011 at 2:34
from snappy.
OK, that was just a quick shot. Here is a modified version with renamed
functions and additional comments. I also added the BSD headers as applied to
the rest of the snappy sources. Please feel free to modify anything as you like.
Original comment by [email protected]
on 3 Apr 2011 at 3:57
Attachments:
from snappy.
Great. So, two things:
- There are still some style nits -- in particular, several lines above 80
characters, some double blank lines and some spaces before ( in the prototype.
I can fix these if you don't want to, though.
- You'll need to sign a contributor license agreement
(http://code.google.com/legal/individual-cla-v1.0.html). Note that this is not
a transfer of copyright, just a form to give Google permission to use and
relicense the code. Note that this can be done electronically, so you won't
have to mail/fax anything; see the form at the bottom.
Original comment by [email protected]
on 4 Apr 2011 at 9:28
from snappy.
No problem. Here's another version that hopefully fixes the remaining
formatting issues. If there are still small things to be corrected, please fix
them directly. That's probably easier and faster than telling me about them. :)
I've also signed the license agreement you mentioned above.
Original comment by [email protected]
on 4 Apr 2011 at 10:42
Attachments:
from snappy.
Original comment by [email protected]
on 4 Apr 2011 at 11:51
- Changed state: Started
from snappy.
Here's yet another version. I've changed the comments in snappy-c.h to plain C
style to avoid potential compilation issues.
Original comment by [email protected]
on 5 Apr 2011 at 10:32
Attachments:
from snappy.
Fixed in r27. (There were quite a few changes in internal code review.) Thanks
for your contribution. :-)
Original comment by [email protected]
on 8 Apr 2011 at 9:54
- Changed state: Accepted
from snappy.
Original comment by [email protected]
on 8 Apr 2011 at 10:00
- Changed state: Fixed
from snappy.
Related Issues (20)
- Various MSVC x64 compiler size_t warnings (C4267) HOT 6
- Does not handle data larger than 4GB HOT 8
- Mistakes on the start page HOT 5
- cppcheck - Member variable is not initialized in the constructor. HOT 2
- Type 'ssize_t' not defined for MSVC builds HOT 4
- snappy needs a command line utility HOT 5
- MIsspelled in code HOT 1
- testdata/mapreduce-osd-1-pdf contains "DO NOT DISTRIBUTE" disclaimer HOT 3
- Patch for compiling Snappy with MSVC on Windows HOT 3
- Bug in IncrementalCopyFastPath HOT 6
- use ctypes.util.find_library HOT 3
- ARMv6 and unaligned access HOT 3
- Decompression issues with Snappy 1.1.2 HOT 3
- ahsan ullah HOT 2
- Seeing Null Values from Hive with Snappy Compression HOT 1
- No versioned link for current build HOT 2
- ppc64le entry is needed in config.guess file HOT 4
- performance issue in snappy.cc - I am using version 1.1.2 HOT 2
- Unnecessary memory allocation in snappy.cc:Compress HOT 1
- bad_alloc exception not caught in snappy.cc::Compress
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snappy.