JAR: JAM Axiomatic Reference

13.3.Β Segment OperationsπŸ”—

πŸ”—def
Jar.Erasure.split (data : ByteArray) (k n : Nat) : Array ByteArray
Jar.Erasure.split (data : ByteArray) (k n : Nat) : Array ByteArray

Split a blob into k sub-sequences of n octets each.

πŸ”—def
Jar.Erasure.join (chunks : Array ByteArray) : ByteArray
Jar.Erasure.join (chunks : Array ByteArray) : ByteArray

Join k sub-sequences into a single blob.

πŸ”—def
Jar.Erasure.erasureCodeSegment [Jar.JamConfig] (segment : ByteArray) : Array ByteArray
Jar.Erasure.erasureCodeSegment [Jar.JamConfig] (segment : ByteArray) : Array ByteArray

Erasure-code a segment (4104 bytes = W_G) with k=6 parallelism. GP Β§14: segments are W_G = 4104 bytes, encoded with k=6.

πŸ”—def
Jar.Erasure.recoverSegment [Jar.JamConfig] (chunks : Array (ByteArray Γ— Nat)) : Option ByteArray
Jar.Erasure.recoverSegment [Jar.JamConfig] (chunks : Array (ByteArray Γ— Nat)) : Option ByteArray

Recover a segment from validator chunks.