couchdb-snappy.git
3 months agoFix memory bug in SnappyNifSink::Append master 9/head CouchDB-1.0.2
Paul J. Davis [Tue, 16 Oct 2018 16:07:58 +0000 (11:07 -0500)] 
Fix memory bug in SnappyNifSink::Append

Previously `SnappyNifSink` assumed that `GetAppendBuffer` was always
called before `Append`. This turned out to be an invalid assumption.
This was definitely in the land of "How did that even work?". The simple
fix is simple.

This also pre-allocates the write buffer to 8192 bytes which just saves
us from the initial re-allocation on first `Append` since we allocated a
zero length buffer initially.

3 months agoNormalize capitalization
Paul J. Davis [Tue, 16 Oct 2018 15:51:18 +0000 (10:51 -0500)] 
Normalize capitalization

7 months agoBuild with Erlang 21 7/head CouchDB-1.0.1
Nick Vatamaniuc [Wed, 20 Jun 2018 21:15:14 +0000 (17:15 -0400)] 
Build with Erlang 21

Issue #1396

18 months agoMerge https://github.com/goncalotomas/couchdb-snappy CouchDB-1.0.0
Joan Touzet [Fri, 23 Jun 2017 20:21:36 +0000 (16:21 -0400)] 
Merge https://github.com/goncalotomas/couchdb-snappy

18 months agoadd erlang 20 6/head
Gonçalo Tomás [Thu, 22 Jun 2017 07:57:02 +0000 (08:57 +0100)] 
add erlang 20

add version support for otp 19 and 20

Allow erlang 20

Allow erlang 20

Allow erlang 20

Allow erlang 20

2 years agoAllow erlang 19
Robert Newson [Thu, 14 Jul 2016 15:02:06 +0000 (16:02 +0100)] 
Allow erlang 19

COUCHDB-3058

2 years agoSupport Windows compilation 5/head
NickNorth [Wed, 20 Jan 2016 09:37:48 +0000 (09:37 +0000)] 
Support Windows compilation

3 years agoUpdate .travis.yml
Alexander Shorin [Fri, 22 Jan 2016 10:03:27 +0000 (13:03 +0300)] 
Update .travis.yml

- Add license header
- Remove builds against old Erlang releases

3 years agoFix signed-vs.-unsigned comparison warnings 4/head
Alexander Shorin [Mon, 26 Oct 2015 15:51:00 +0000 (18:51 +0300)] 
Fix signed-vs.-unsigned comparison warnings

This includes:
- https://github.com/google/snappy/commit/d80342922
- https://github.com/google/snappy/pull/11

3 years agoUpdate snappy to 1.1.3 release
Alexander Shorin [Mon, 26 Oct 2015 15:09:01 +0000 (18:09 +0300)] 
Update snappy to 1.1.3 release

COUCHDB-2873

3 years agoIntegrate with Travis CI 3/head
Alexander Shorin [Fri, 24 Jul 2015 04:25:50 +0000 (07:25 +0300)] 
Integrate with Travis CI

3 years agoStandardize Makefile commands
Alexander Shorin [Fri, 24 Jul 2015 04:25:37 +0000 (07:25 +0300)] 
Standardize Makefile commands

3 years agoallow erlang 18 builds also
Robert Newson [Thu, 2 Jul 2015 22:00:08 +0000 (23:00 +0100)] 
allow erlang 18 builds also

3 years agoMake with -lstdc++ on BSD systems
Alexander Shorin [Fri, 3 Apr 2015 22:52:47 +0000 (01:52 +0300)] 
Make with -lstdc++ on BSD systems

Without linking with libstdc++ snappy_nif builds fine, but fails to
load in runtime which causes confusing errors from CouchDB side.

3 years agoSupport big-endian builds 2/head
Bryan Chan [Tue, 17 Feb 2015 14:41:27 +0000 (09:41 -0500)] 
Support big-endian builds

4 years agoExclude ComputeTable from building
H. Diedrich [Fri, 14 Nov 2014 15:52:09 +0000 (16:52 +0100)] 
Exclude ComputeTable from building

Set NDEBUG as CXXFLAGS to skip the compilation of this debug function.

The NDEBUG logic is broken because REGISTER_MODULE_INITIALIZER(snappy,
ComputeTable()); is set to always result to nothing, independently of
NDEBUG.

If debug tests should instead be included in the build, both NDEBUG
must not be set (as before) but also, REGISTER_MODULE_INITIALIZER
repaired.

COUCHDB-2463

This closes #1

Signed-off-by: Alexander Shorin <kxepal@apache.org>
4 years agoUpdate URL for snappy
Alexander Shorin [Thu, 20 Nov 2014 00:01:42 +0000 (03:01 +0300)] 
Update URL for snappy

4 years agoDrop support of R13
Alexander Shorin [Wed, 19 Nov 2014 23:57:45 +0000 (02:57 +0300)] 
Drop support of R13

4 years agoFix Makefile to use system-wide rebar
Alexander Shorin [Wed, 19 Nov 2014 23:26:13 +0000 (02:26 +0300)] 
Fix Makefile to use system-wide rebar

4 years agoUpdate snappy to 1.0.5
Alexander Shorin [Wed, 19 Nov 2014 23:25:51 +0000 (02:25 +0300)] 
Update snappy to 1.0.5

4 years agoremove binary rebar 1994-merge-rcouch
Robert Newson [Wed, 27 Aug 2014 20:18:31 +0000 (21:18 +0100)] 
remove binary rebar

4 years agosupport erlang 17.0
Robert Newson [Sun, 27 Apr 2014 16:55:42 +0000 (17:55 +0100)] 
support erlang 17.0

5 years agosupport R16
benoitc [Mon, 4 Mar 2013 19:58:11 +0000 (20:58 +0100)] 
support R16

6 years agoport_envs is depreacted
benoitc [Mon, 26 Mar 2012 12:53:31 +0000 (14:53 +0200)] 
port_envs is depreacted

7 years agohandle erlang R15B
benoitc [Thu, 15 Dec 2011 07:08:09 +0000 (08:08 +0100)] 
handle erlang R15B

7 years agoupgrade to 1.0.3
benoitc [Sun, 19 Jun 2011 11:22:52 +0000 (13:22 +0200)] 
upgrade to 1.0.3

7 years agoRemoved unnecessary release binary call
Filipe David Manana [Sun, 15 May 2011 11:23:04 +0000 (12:23 +0100)] 
Removed unnecessary release binary call

7 years agoMerge pull request #2 from refuge/refuge
Filipe Manana [Sun, 15 May 2011 11:15:08 +0000 (04:15 -0700)] 
Merge pull request #2 from refuge/refuge

remove the use of autotools, doesn't work so well when embedding snappy

7 years agoremove the use of autotools, doesn't work so well when embedding snappy
benoitc [Sun, 15 May 2011 06:54:26 +0000 (08:54 +0200)] 
remove the use of autotools, doesn't work so well when embedding snappy
with other projects.

7 years agoAdded stripped version of google snappy (excluded only the unit tests)
Filipe David Manana [Mon, 2 May 2011 10:37:03 +0000 (11:37 +0100)] 
Added stripped version of google snappy (excluded only the unit tests)

7 years agoRemoved all google snappy files
Filipe David Manana [Mon, 2 May 2011 10:19:07 +0000 (11:19 +0100)] 
Removed all google snappy files

7 years agoEventually catch any exception thrown when instantiating a snappy::ByteArraySource
Filipe David Manana [Mon, 2 May 2011 10:16:50 +0000 (11:16 +0100)] 
Eventually catch any exception thrown when instantiating a snappy::ByteArraySource

7 years agoAdded module to .app file
Filipe David Manana [Sat, 16 Apr 2011 22:06:48 +0000 (23:06 +0100)] 
Added module to .app file

7 years agoMissing file rename from previous commit
Filipe David Manana [Sat, 16 Apr 2011 21:44:29 +0000 (22:44 +0100)] 
Missing file rename from previous commit

7 years agoRenamed snappy.so to snappy_nif.so
Filipe David Manana [Sat, 16 Apr 2011 16:00:02 +0000 (17:00 +0100)] 
Renamed snappy.so to snappy_nif.so

This is mostly to avoid autotools configuration errors in Apache CouchDB.

7 years agoCatch all C++ exceptions to avoid crashing the Erlang VM.
Filipe David Manana [Fri, 15 Apr 2011 16:46:11 +0000 (17:46 +0100)] 
Catch all C++ exceptions to avoid crashing the Erlang VM.

7 years agoFix NIF library initialization on R13B04
Filipe David Manana [Fri, 8 Apr 2011 20:27:15 +0000 (21:27 +0100)] 
Fix NIF library initialization on R13B04

This avoids 'undefined symbol' errors when loading the NIF in R13B04.

7 years agorebar now calls the build script. rebar update.
Arne Ehrlich [Wed, 6 Apr 2011 21:34:51 +0000 (23:34 +0200)] 
rebar now calls the build script. rebar update.

7 years agoUpdated .gitignore
Filipe David Manana [Wed, 6 Apr 2011 21:14:24 +0000 (22:14 +0100)] 
Updated .gitignore

7 years agoRe-added all snappy source files from snappy-1.0.1.tar.gz
Filipe David Manana [Wed, 6 Apr 2011 21:09:58 +0000 (22:09 +0100)] 
Re-added all snappy source files from snappy-1.0.1.tar.gz

Some files were from svn trunk and caused build problems on
some platforms/environments. Now everything should be ok
everywhere.

7 years agoRemoved all snappy files
Filipe David Manana [Wed, 6 Apr 2011 21:09:04 +0000 (22:09 +0100)] 
Removed all snappy files

7 years agoExtracted snappy-1.0.1.tar.gz into c_src/google-snappy/
Filipe David Manana [Tue, 5 Apr 2011 20:36:05 +0000 (21:36 +0100)] 
Extracted snappy-1.0.1.tar.gz into c_src/google-snappy/

7 years agoCleanup google-snappy taken from dev svn repository
Filipe David Manana [Tue, 5 Apr 2011 20:27:52 +0000 (21:27 +0100)] 
Cleanup google-snappy taken from dev svn repository

7 years agoUpdated license for erl_nif_compat.h
Filipe David Manana [Tue, 5 Apr 2011 19:20:32 +0000 (20:20 +0100)] 
Updated license for erl_nif_compat.h

When I grabbed it, I had no idea it was licensed by Basho Technologies, Inc.

7 years agoSimpler exception when the NIF library is not loaded
Filipe David Manana [Sun, 3 Apr 2011 17:40:53 +0000 (18:40 +0100)] 
Simpler exception when the NIF library is not loaded

7 years agoUpdated snappy.app.src to reflect google-snappy version (1.0.1)
Filipe David Manana [Sun, 3 Apr 2011 15:33:28 +0000 (16:33 +0100)] 
Updated snappy.app.src to reflect google-snappy version (1.0.1)

7 years agoAvoid allocating too little memory and too often
Filipe David Manana [Sun, 3 Apr 2011 14:48:22 +0000 (15:48 +0100)] 
Avoid allocating too little memory and too often

7 years agoUpdated .gitignore
Filipe David Manana [Sun, 3 Apr 2011 14:41:41 +0000 (15:41 +0100)] 
Updated .gitignore

7 years agoUpgraded erl_nif_compat.h
Filipe David Manana [Sun, 3 Apr 2011 14:31:29 +0000 (15:31 +0100)] 
Upgraded erl_nif_compat.h

7 years agoAll functions now accept IoLists as well
Filipe David Manana [Sun, 27 Mar 2011 19:50:39 +0000 (20:50 +0100)] 
All functions now accept IoLists as well

7 years agoOn realloc error, release previously allocated memory
Filipe David Manana [Sun, 27 Mar 2011 19:41:37 +0000 (20:41 +0100)] 
On realloc error, release previously allocated memory

7 years agorebar.config: nowarn_shadow_vars => warn_shadow_vars,
Filipe David Manana [Sun, 27 Mar 2011 19:36:06 +0000 (20:36 +0100)] 
rebar.config: nowarn_shadow_vars => warn_shadow_vars,

7 years agorebar.config cleanup, much smaller snappy.so object
Filipe David Manana [Sat, 26 Mar 2011 19:55:30 +0000 (19:55 +0000)] 
rebar.config cleanup, much smaller snappy.so object

Removed unnecessary linking with all the shared objects from google-snappy
(it even linked with the unit tests object). The final snappy.so NIF object is
now about 135Kb instead of 400Kb.

7 years agoRemoved comment code
Filipe David Manana [Sat, 26 Mar 2011 16:36:31 +0000 (16:36 +0000)] 
Removed comment code

After the fix in 8629cad7a52c01e3184b042690a9e8e6435fce95, this code has
now the expected behaviour.

7 years agoFix bug on decompression
Filipe David Manana [Sat, 26 Mar 2011 16:29:35 +0000 (16:29 +0000)] 
Fix bug on decompression

The uncompressed length was being used where the compressed length was expected.

The particular compression input data that triggered the bug was added to
the eunit test.

7 years agoMore markdown fixes
Filipe David Manana [Sat, 26 Mar 2011 12:34:16 +0000 (12:34 +0000)] 
More markdown fixes

7 years agomarkdown fixes
Filipe David Manana [Sat, 26 Mar 2011 12:33:04 +0000 (12:33 +0000)] 
markdown fixes

7 years agoUpdated README.md with site info and some performance tests
Filipe David Manana [Sat, 26 Mar 2011 12:30:26 +0000 (12:30 +0000)] 
Updated README.md with site info and some performance tests

7 years agoUpdated rebar.config and the Makefile
Filipe David Manana [Sat, 26 Mar 2011 12:17:13 +0000 (12:17 +0000)] 
Updated rebar.config and the Makefile

7 years agoFix cursed copy-paste error
Filipe David Manana [Sat, 26 Mar 2011 02:34:59 +0000 (02:34 +0000)] 
Fix cursed copy-paste error

7 years agoAdded definition for enif_realloc_binary_compat
Filipe David Manana [Sat, 26 Mar 2011 02:25:49 +0000 (02:25 +0000)] 
Added definition for enif_realloc_binary_compat

7 years agoRemoved compatibility with R13B03 and fixed build on R13B04
Filipe David Manana [Sat, 26 Mar 2011 02:19:33 +0000 (02:19 +0000)] 
Removed compatibility with R13B03 and fixed build on R13B04

R13B03 doesn't provide enif_realloc_binary, so drop support for this
release.

R13B04 enif_alloc_binary and enif_realloc_binary require a first
argument of type ErlNifEnv* in R13B04, which was not being passed and
caused compilation failure on this release.

7 years agoRenamed tests
Filipe David Manana [Sat, 26 Mar 2011 02:07:42 +0000 (02:07 +0000)] 
Renamed tests

7 years agoAvoid unnecessary memory reallocations
Filipe David Manana [Sat, 26 Mar 2011 02:00:22 +0000 (02:00 +0000)] 
Avoid unnecessary memory reallocations

Before increasing the size of the buffer, it wasn't verified if there was
still room left for the new compressed data chunk.

7 years agoAvoid double buffering
Filipe David Manana [Sat, 26 Mar 2011 01:51:37 +0000 (01:51 +0000)] 
Avoid double buffering

No we no longer use an intermediary buffer which is then copied into the
binary term. This is much more efficient for large data chunks.

7 years agoAdded a few more test assertions
Filipe David Manana [Sat, 26 Mar 2011 01:51:21 +0000 (01:51 +0000)] 
Added a few more test assertions

7 years agoInitial import
Filipe David Manana [Fri, 25 Mar 2011 21:57:27 +0000 (21:57 +0000)] 
Initial import