**序列化对象到内存或硬盘**
*Serialization(序列化)是一种将对象以一连串的字节描述的过程;反序列化 deserialization 是一种将这些字节重建成一个对象的过程。*
```autohotkey
保存对象到内存(变量)
size := ObjDump(Object,Variable,DumpBuffer)
保存对象到硬盘(文件)
size := ObjDump(FilePath,Object,DumpBuffer)
```
从内存(变量)读取对象
Obj := ObjLoad(Address)
从硬盘读取对象
Obj := ObjLoad(FilePath)
### 返回 Returns:
size 文件大小(字节)
### 示例 Example
```autohotkey
theMap := Object("A","a","B","1234")
StartTime := A_TickCount
FilePath := "D:\AHKs\Dev\SerializationTest.Obj"
size := ObjDump(FilePath,theMap)
LogPrintln(size,A_LineFile "(" A_LineNumber ")" " : " "size >>> `r`n")
SerializationTestObj := ObjLoad(FilePath)
LogPrintln(SerializationTestObj,A_LineFile "(" A_LineNumber ")" " : " "SerializationTestObj >>> `r`n")
```
From:<https://www.autohotkey.com/boards/viewtopic.php?f=6&t=3573>
- 指南 (README)
- 常见问题 (FAQ)
- 更新历史(CHANGELOG)
- 贡献指南 (CONTRIBUTING)
- 开源协议 (LICENCE)
- 鸣谢 (ACKNOWLEDGEMENT)
- 文档模板 (TEMPLATE)
- 新手指南(BEGINNER_GUIDE)
- 语法高亮(HIGHLIGHTING)
- Class
- _Container
- _EX
- _List
- _Map
- _Win
- _Wins
- BeanEnum
- HotString
- HotStringMaps
- InvisibleCharacter
- JSON
- JsonFile
- Method
- ObservableMap
- ObservableObj
- WinEvent
- Timer
- MesToast
- APPLocker
- AutoClassify
- Everything
- Function
- Ini
- AutoInputBox
- ParaChecker
- PathObj
- RunningSpeedTest
- Script
- Switcher
- Stack
- TimeChecker
- Type
- UMSS
- Function
- assert()
- Analyze()
- AnalyzeClassName()
- AutoBind()
- bulkMoveFile()
- ExcelToList()
- getClass()
- getCurrentTime()
- getFunc()
- Instanof()
- InstanceCheck()
- loadMethod()
- LogPrintln()
- rawCall()
- RandomStr()
- showObj()
- Type()
- throwWithSt()
- UseCMD()
- ObjDump()
- Test
- ObjLoad()
- StringMethod
- TypeClass
- MapFactory()