calculate AWS S3 etag by multi upload
Ruby
Switch branches/tags
Nothing to show
Latest commit 7705849 Jun 26, 2012 @swdyh swdyh added travis-ci status
Permalink
Failed to load latest commit information.
bin init Jun 25, 2012
lib fixed threashold case Jun 26, 2012
test added test Jun 26, 2012
.travis.yml added travis-ci config Jun 26, 2012
Gemfile added gemfile Jun 26, 2012
README.md added travis-ci status Jun 26, 2012
Rakefile added test task Jun 26, 2012
s3etag.gemspec update description Jun 26, 2012

README.md

S3etag

Build Status

calculate AWS S3 etag

Generally the ETAG is the MD5 of the object. If the object was uploaded using multipart upload then this is the MD5 all of the upload-part-md5s.

http://docs.amazonwebservices.com/AWSRubySDK/latest/AWS/S3/S3Object.html#etag-instance_method

Install

% gem install s3etag

Gem

require 's3etag'

p S3Etag.calc(:data => 'a' * 1000)
p S3Etag.calc(:data => 'a' * 1000, :threshold => 100, :min_part_size => 100)
p S3Etag.calc(:file => 'test.txt')
p S3Etag.calc(:file => '.text.text', :threshold => 100, :min_part_size => 100)

Command line

% s3etag
s3etag file
    -t, --threshold threshold
    -p, --max-parts max-parts
    -s, --min_part_size min_part_size

% s3etag text.txt
91fdac689d4861c9ae7a0afa21a1f6b8-18

% s3etag -s 10000000 text.text
32aafcd9748824e559b4dbd6b908f6fa-10

Etc

https://github.com/swdyh/s3etag The MIT License