github.com/sberex/go-sberex@v1.8.2-0.20181113200658-ed96ac38f7d7/rlp/doc.go (about)

     1  // This file is part of the go-sberex library. The go-sberex library is 
     2  // free software: you can redistribute it and/or modify it under the terms 
     3  // of the GNU Lesser General Public License as published by the Free 
     4  // Software Foundation, either version 3 of the License, or (at your option)
     5  // any later version.
     6  //
     7  // The go-sberex library is distributed in the hope that it will be useful, 
     8  // but WITHOUT ANY WARRANTY; without even the implied warranty of
     9  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 
    10  // General Public License <http://www.gnu.org/licenses/> for more details.
    11  
    12  /*
    13  Package rlp implements the RLP serialization format.
    14  
    15  The purpose of RLP (Recursive Linear Prefix) is to encode arbitrarily
    16  nested arrays of binary data, and RLP is the main encoding method used
    17  to serialize objects in Sberex. The only purpose of RLP is to encode
    18  structure; encoding specific atomic data types (eg. strings, ints,
    19  floats) is left up to higher-order protocols; in Sberex integers
    20  must be represented in big endian binary form with no leading zeroes
    21  (thus making the integer value zero equivalent to the empty byte
    22  array).
    23  
    24  RLP values are distinguished by a type tag. The type tag precedes the
    25  value in the input stream and defines the size and kind of the bytes
    26  that follow.
    27  */
    28  package rlp