Skip to content

jakelarkn/packbin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packbin

Ruby style byte-packed data interoperability for Scala

The aim of this is to be able to support the serialization and deserialization of binary data that is interoperable with Ruby pack/unpack encodings in Scala

Ruby Methods

This is a work in progress. right now only the C, S, L and Q directives are supported. Wildcard is not supported. Others should not be difficult to add.

Usage / Example

scala> import com.jakeokt.packbin._
import com.jakeokt.packbin._

scala> val data = BytePacking.pack(List(1,2,3,4), "CSLQ").array()
data: Array[Byte] = Array(1, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0)

scala> BytePacking.unpack(data, "CSLQ")
res1: Seq[BigInt] = Vector(1, 2, 3, 4)

About

Ruby style byte-packing data interoperability for Scala

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages