(* top-level interface for wire type *)
Definition serialize_top (s : IOStreamWriter.t) : IOStreamWriter.wire :=
IOStreamWriter.wire_wrap s.
Definition deserialize_top {A: Type}
(d : ByteListReader.t A) (w : IOStreamWriter.wire) : option A :=
match ByteListReader.unwrap d (IOStreamWriter.wire_unwrap w) with
| Some (a, []) => Some a
| _ => None
end.

Axiom wire_deserialize : ByteListReader.t IOStreamWriter.wire.