| 1 | ---
 | 
| 2 | in_progress: yes
 | 
| 3 | all_docs_url: ..
 | 
| 4 | body_css_class: width40
 | 
| 5 | default_highlighter: oils-sh
 | 
| 6 | preserve_anchor_case: yes
 | 
| 7 | ---
 | 
| 8 | 
 | 
| 9 | Packle
 | 
| 10 | ======
 | 
| 11 | 
 | 
| 12 | This chapter in the [Oils Reference](index.html) describes Packle, a binary
 | 
| 13 | serialization format for object graphs.
 | 
| 14 | 
 | 
| 15 | It's a secure subset of Python's `pickle` format.
 | 
| 16 | 
 | 
| 17 | Advantages:
 | 
| 18 | 
 | 
| 19 | - Strings are length-prefixed, so they don't need to be escaped and unescaped.
 | 
| 20 | - Exact float representation, with NaN, Inf, and -Inf values.
 | 
| 21 | - Represent graphs, not just trees.  (Think "JSON key sharing")
 | 
| 22 | - Strict Byte strings and strict Unicode, not the mess of JSON strings.
 | 
| 23 | 
 | 
| 24 | <div id="toc">
 | 
| 25 | </div>
 | 
| 26 | 
 | 
| 27 | 
 | 
| 28 | ## Atoms
 | 
| 29 | 
 | 
| 30 | TODO: describe wire format.
 | 
| 31 | 
 | 
| 32 | ### Null
 | 
| 33 | 
 | 
| 34 | ### Bool
 | 
| 35 | 
 | 
| 36 | ### Int
 | 
| 37 | 
 | 
| 38 | ### Float
 | 
| 39 | 
 | 
| 40 | ### Bytes
 | 
| 41 | 
 | 
| 42 | ### Unicode
 | 
| 43 | 
 | 
| 44 | ## Compound
 | 
| 45 | 
 | 
| 46 | TODO: describe wire format.
 | 
| 47 | 
 | 
| 48 | ### List
 | 
| 49 | 
 | 
| 50 | ### Dict
 | 
| 51 | 
 | 
| 52 | 
 | 
| 53 | [JSON]: https://json.org
 | 
| 54 | 
 |