Skip to content

Commit ffcbe2f

Browse files
committed
gh-992 need review
1 parent 5ab5d01 commit ffcbe2f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

doc/dev_guide/internals/box_protocol.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ MsgPack data types:
4747
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4848
Encoding of non default types in Tarantool
4949
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50-
.. надо что-то написать в начале (((
51-
Introduction to submodule.
50+
51+
Some data types used in our database do not correspond to any type of message
52+
from MsgPack. For these data types, we use the following representation.
5253

5354
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5455
Decimals
@@ -61,8 +62,8 @@ MP_DECIMAL is 1.
6162

6263
`MsgPack spec <https://github.com/msgpack/msgpack/blob/master/spec.md#ext-format-family>`_
6364
defines ``fixext 1/2/4/8/16`` and ``ext 8/16/32`` types. ``fixext``
64-
types have fixed length, so it is not encoded explicitly, while ``ext`` types require
65-
to encode a data length. MP_EXP + optional length meant usage of one of those types.
65+
types have fixed length so it is not encoded explicitly, while ``ext`` types require
66+
the data length to be encoded. ``MP_EXP`` + optional ``length`` meant usage of one of those types.
6667

6768
The decimal MsgPack representation looks like this:
6869

@@ -73,7 +74,7 @@ The decimal MsgPack representation looks like this:
7374
+--------+-------------------+------------+===============+
7475
7576
Here ``length`` is the length of PackedDecimal field, and it is of type
76-
``MP_UINT``, when encoded explicitly (i.e. when type is ext 8/16/32).
77+
``MP_UINT``, when encoded explicitly (i.e. when type is ``ext 8/16/32``).
7778

7879
PackedDecimal has the following structure:
7980

@@ -93,11 +94,11 @@ so ``byte >> 4`` is the first digit and ``byte & 0x0f`` is the second digit.
9394
The leftmost digit in the array is the most significant.
9495
The rightmost digit in the array is the least significant.
9596

96-
The first byte in the BCD array may have only the second digit.
97-
The last byte in the BCD array has only the first digit and a ``nibble``.
97+
The first byte in the BCD array may have only second digit.
98+
The last byte in the BCD array has only first digit and a ``nibble``.
9899

99100
The ``nibble`` represents the number's sign. ``0x0a``, ``0x0c``, ``0x0e``, ``0x0f``
100-
stand for plus, ``0x0b``, ``0x0d`` stand for minus.
101+
stand for plus, ``0x0b`` and ``0x0d`` stand for minus.
101102

102103
**Example**
103104

0 commit comments

Comments
 (0)