- length : Bytes → Nat
- empty : Bytes
- recognizeEmpty : Bytes → Bool
- concat : Bytes → Bytes → Bytes
- fromByteArray (b : ByteArray) : Bytes
- from_to_ByteArray (b : Bytes) : match toByteArray b with | none => True | some res => fromByteArray res = b
Instances
def Comparse.concatPrefixes {Bytes : Type} [BytesLike Bytes] (prefixes : List Bytes) (suffix : Bytes) :
Bytes
Equations
- Comparse.concatPrefixes prefixes suffix = List.foldr Comparse.BytesLike.concat suffix prefixes
Instances For
class Comparse.NonExtensibleMessageFormat.IsNonAmbiguous {Bytes : Type} [BytesLike Bytes] {a : Type} (mf : NonExtensibleMessageFormat Bytes a) :
Instances
class Comparse.NonExtensibleMessageFormat.HasUniqueRepresentation {Bytes : Type} [BytesLike Bytes] {a : Type} (mf : NonExtensibleMessageFormat Bytes a) :
Instances
class Comparse.NonExtensibleMessageFormat.ParseConsumes {Bytes : Type} [BytesLike Bytes] {a : Type} (mf : NonExtensibleMessageFormat Bytes a) :
- parse_consumes (buf : Bytes) : match mf.parse buf with | none => True | some (fst, suffix) => BytesLike.length suffix < BytesLike.length buf
Instances
- pred_empty : pred BytesLike.empty
- pred_concat (lhs rhs : Bytes) : pred lhs → pred rhs → pred (BytesLike.concat lhs rhs)
- pred_fromByteArray (b : ByteArray) : pred (BytesLike.fromByteArray b)
Instances
theorem Comparse.ExtensibleMessageFormat.wf_eq {Bytes : Type} [BytesLike Bytes] {a : Type} (mf : ExtensibleMessageFormat Bytes a) (pred : Bytes → Prop) (x : a) :