From 643a33de694785b2b4bf6056cb0b3fd7734bf3f7 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 26 Apr 2013 23:10:16 +0200 Subject: [PATCH] Small touches on framing --- pep-3154.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pep-3154.txt b/pep-3154.txt index 9fc3eb135..9d919bf4a 100644 --- a/pep-3154.txt +++ b/pep-3154.txt @@ -71,11 +71,14 @@ of a pickle is thus the following:: To keep the implementation simple, it is forbidden for a pickle opcode to overlap frame boundaries. The pickler takes care not to produce such -pickles, and the unpickler refuses them. +pickles, and the unpickler refuses them. Also, there is no "last frame" +marker. The last frame is simply the one which ends with a STOP opcode. -How the pickler decides frame sizes is an implementation detail. -A simple heuristic committing the current frame as soon as it reaches -64 KiB seems sufficient. +.. note:: + + How the pickler partitions the pickle stream into frames is an + implementation detail. "Closing" a frame as soon as it reaches + ~64 KiB should be ok for both performance and pickle size overhead. Binary encoding for all opcodes -------------------------------