
sigma.serialization.SigmaPropBytesSerializer.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sigma-state_2.13 Show documentation
Show all versions of sigma-state_2.13 Show documentation
Interpreter of a Sigma-State language
The newest version!
package sigma.serialization
import sigma.ast.{SType, SigmaPropBytes, Value}
import sigma.serialization.CoreByteWriter.DataInfo
import sigma.ast.syntax._
import SigmaByteWriter._
object SigmaPropBytesSerializer extends ValueSerializer[SigmaPropBytes] {
import sigma.ast.Operations.SigmaPropBytesInfo._
override def opDesc = SigmaPropBytes
val thisInfo: DataInfo[SValue] = thisArg
def serialize(obj: SigmaPropBytes, w: SigmaByteWriter): Unit = {
w.putValue(obj.input, thisInfo)
}
def parse(r: SigmaByteReader): Value[SType] = {
val p = r.getValue().asSigmaProp
SigmaPropBytes(p)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy