chunked
Version, currently 0.2.04 versions
github.com/unn4m3d/chunked
No description declared in shard.yml.
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
chunked:
github: unn4m3d/chunked
version: ~> 0.2.0Then run:
shards installshard.yml
- Crystal
0.19.4- License
- MIT
- Author
- unn4m3d
Dependencies
Runtime Dependencies
- version*github: unn4m3d/version
README
chunked
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
- Fork it ( https://github.com/unn4m3d/chunked/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- unn4m3d - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.2.0- Tagged
- Sep 15, 2021
- Commit
0421b378d91c- Crystal
0.19.4- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/unn4m3d/chunked
Metadata
- Created
- Aug 16, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 4