|
4.
|
|
|
Banana Encodings
|
|
|
type: Content of: <html><body><h2>
|
|
|
|
Encodages banana
|
|
Translated and reviewed by
Patrick Fiquet
|
|
|
|
Located in
specifications/banana.xhtml:21
|
|
5.
|
|
|
The banana protocol is a stream of data composed of elements. Each element has the following general structure - first, the length of element encoded in base-128, least signficant bit first. For example length 4674 will be sent as <code>0x42 0x24</code>. For certain element types the length will be omitted (e.g. float) or have a different meaning (it is the actual value of integer elements).
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
specifications/banana.xhtml:24
|
|
6.
|
|
|
Following the length is a delimiter byte, which tells us what kind of element this is. Depending on the element type, there will then follow the number of bytes specified in the length. The byte's high-bit will always be set, so that we can differentiate between it and the length (since the length bytes use 128-base, their high bit will never be set).
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
specifications/banana.xhtml:32
|
|
7.
|
|
|
Element Types
|
|
|
type: Content of: <html><body><h2>
|
|
|
|
Types d'élément
|
|
Translated and reviewed by
Jean-François Brouillette
|
|
|
|
Located in
specifications/banana.xhtml:39
|
|
8.
|
|
|
Given a series of bytes that gave us length N, these are the different delimiter bytes:
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
specifications/banana.xhtml:42
|
|
9.
|
|
|
List -- 0x80
|
|
|
type: Content of: <html><body><dl><dt>
|
|
|
|
Liste -- 0x80
|
|
Translated and reviewed by
Anthony Granger
|
|
|
|
Located in
specifications/banana.xhtml:46
|
|
10.
|
|
|
The following bytes are a list of N elements. Lists may be nested, and a child list counts as only one element to its parent (regardless of how many elements the child list contains).
|
|
|
type: Content of: <html><body><dl><dd>
|
|
|
|
Les octets suivants sont une liste de N éléments. Les listes peuvent être imbriquées, et une liste enfant est considérée comme un seul élément par son parent (quel que soit le nombre d'éléments que contient la liste).
|
|
Translated and reviewed by
Anthony Granger
|
|
|
|
Located in
specifications/banana.xhtml:48
|
|
11.
|
|
|
Integer -- 0x81
|
|
|
type: Content of: <html><body><dl><dt>
|
|
|
|
Entier -- 0X81
|
|
Translated and reviewed by
Jean-François Brouillette
|
|
|
|
Located in
specifications/banana.xhtml:52
|
|
12.
|
|
|
The value of this element is the positive integer N. Following bytes are not part of this element. Integers can have values of 0 <= N <= 2147483647.
|
|
|
type: Content of: <html><body><dl><dd>
|
|
|
|
La valeur de cet élément est l'entier positif N. Les octets suivants ne font pas partie de cet élément. Les entiers peuvent avoir comme valeur 0 <= N <= 2147483647.
|
|
Translated and reviewed by
Patrick Fiquet
|
|
|
|
Located in
specifications/banana.xhtml:53
|
|
13.
|
|
|
String -- 0x82
|
|
|
type: Content of: <html><body><dl><dt>
|
|
|
|
Chaîne -- 0x82
|
|
Translated and reviewed by
Jean-François Brouillette
|
|
|
|
Located in
specifications/banana.xhtml:55
|