couchdb-snappy.git
11 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

11 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

11 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

11 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.

11 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.

11 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.

11 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.

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

11 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.

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

11 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/

11 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

11 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.

11 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

11 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)

11 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

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

11 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

11 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

11 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

11 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,

11 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.

11 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.

11 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.

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

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

11 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

11 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

11 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

11 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

11 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.

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

11 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.

11 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.

11 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

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