Erlang External Term Format 编解码(Atom/Integer/Float/List/Tuple/Map/Binary/PID/Port/Reference;纯核零依赖;真帧金罐)
| 包 | 内容 |
|---|---|
| thy1016/moonbit-eetf | EtfTerm 值域 + decode/encode 纯核(唯一包,极薄) |
moon check --deny-warn && moon test --target nativepub(all) suberror EtfError {
Truncated(String)
Malformed(String)
DepthExceeded(String)
}pub(all) enum EtfTerm {
EAtom(String)
EInt(Int)
EFloat(Double)
EInt64(Int64)
EExport(String, String, Int)
EOther(String)
EList(Array[EtfTerm])
EImproperList(Array[EtfTerm], EtfTerm)
ETuple(Array[EtfTerm])
EMap(Array[(EtfTerm, EtfTerm)])
EBinary(Bytes)
EString(String)
EPid(String, Int, Int, Int)
EPort(String, Int, Int)
ERef(String, Int, Int, Int)
ENil
}let TAG_BIT_BINARY : Intlet TAG_COMPRESSED : Intlet TAG_EXPORT_EXT : Intlet TAG_FUN_EXT : Intlet TAG_LARGE_BIG : Intlet TAG_MAGIC_REF_INTERNAL : Intlet TAG_NEW_FLOAT : Intlet TAG_NEW_FUN : Intlet TAG_NEW_PORT_V2 : Intlet TAG_NEW_REFERENCE : Intlet TAG_PID_EXT : Intlet TAG_PORT_EXT : Intlet TAG_REFERENCE_EXT : Intlet TAG_SMALL_ATOM : Intlet VERSION_MAGIC : Intfn decode_meta_of(code : Int) -> (String, String, Bool)?fn decode_term(data : Bytes, pos : Int, attab? : Array[String], inflate? : InflateMode) -> (EtfTerm, Int) raise EtfErrorInstall
Download zipErlang External Term Format 编解码(Atom/Integer/Float/List/Tuple/Map/Binary/PID/Port/Reference;纯核零依赖;真帧金罐)