RabbitFileSplit

Simple File Byte Split

Installation

Add this line to your application's Gemfile:

gem 'rabbit_file_split'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rabbit_file_split

Usage

#1M(1048576)byte split
split_file_list = RabbitFileSplit::Bytes.new(file_path).split(1048576)

split_file_list = RabbitFileSplit::Bytes.new(file_path).split(1048576, file_prefix: 'object')
split_file_list = RabbitFileSplit::Bytes.new(file_path).split(1048576, file_prefix: 'object', dest_file_path: '/tmp')
split_file_list = RabbitFileSplit::Bytes.new(file_path).split(1048576, file_prefix: 'object', dest_file_path: '/tmp', buffer_size: 8096)

Contributing

  1. Fork it ( https://github.com/[my-github-username]/rabbit_file_split/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request