chunked

Version, currently 0.1.1-alpha4 versions

github.com/unn4m3d/chunked

No description declared in shard.yml.

0 stars
0 dependents
License: MIT

Nothing has been indexed for 0.1.1-alpha yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  chunked:
    github: unn4m3d/chunked
    version: ~> 0.1.1-alpha

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.1.1-alpha. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

chunked

Build Status

Chunked files writer and reader (Can read, for example, S.T.A.L.K.E.R's all.spawn)

Chunked file usually consists of blocks like following: index:T size:T data:[size]

In case of S.T.A.L.K.E.R.'s all.spawn, T will be UInt32

Installation

Add this to your application's shard.yml:

dependencies:
  chunked:
    github: unn4m3d/chunked

Usage

require "chunked"

reader = Chunked::IndexedReader(UInt32).new("path/to/all.spawn")
reader.index_chunks!
reader.chunks #=> [0 => {size: 3, offset: 8, index: 0},1 => {size: 3, offset: 19, index: 1}, ...]
reader[0] #=> Bytes[1u8,2u8,3u8]
reader.info(0) #=> {size: 3, offset: 8, index: 0}
reader.close

# TODO : More examples

Development

TODO

  • Documentation
  • Examples

Contributing

  1. Fork it ( https://github.com/unn4m3d/chunked/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

Contributors