From 3fd781ee7be4abf832101aba562eba06595de1ed Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Tue, 27 Jul 2021 16:56:31 +0700 Subject: [PATCH] save --- rlp/encodel.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rlp/encodel.go b/rlp/encodel.go index d86dedc4a..e61f62fc7 100644 --- a/rlp/encodel.go +++ b/rlp/encodel.go @@ -26,8 +26,10 @@ import ( // - rlp has 2 data types: List and String (bytes array), and low-level funcs are operate with this types. // - but for convenience and performance - provided higher-level functions (for example for EncodeHash - for []byte of len 32) // - rlp package doesn't manage memory - and Caller must ensure buffers are big enough. -// - each Encode method does write to given buffer and return written len -// - each Parse method does write to given buffer and return written len +// +// Composition: +// - each Encode method does write to given buffer and return written len +// - each Parse accept position in payload and return new position // // General rules: // - functions to calculate prefix len are fast (and pure). it's ok to call them multiple times during encoding of large object for readability.