Libraries: TypeToBytes - page 2

 
Rashid Umarov:
Have the sources been updated in the publication?
No, the source code is old. You are the one with the new features
double Nan = (double)"nan";
 
fxsaber:
can you make a class to run TypeToBit ?

to densely pack data and pass it around like a stock fast.
 
o_O:
maybe make a class for TypeToBit operation ?

to densely pack data and transfer it by stock fast type.
I don't understand what is meant by this.
 
there is an interbank protocol fast (on the same micex used for quotation feed)

in it data are transmitted without extra bytes equal to 0.

for example 4 byte int = 32 bits.

suppose a variable has a value =1. It means that the protocol will send only one bit (=1). instead of 32 (00000000000000000000000000000001).

If for example =16, it will send 5 bits (=10000).

In general, bit representation of data reduces traffic enormously.

----

Bible should be able to pack the transmitted structure into such a bit form and read it back (or return the necessary data from the packed structure).

Fast has other features, of course, but only this feature of its packing is interesting.
 
ArrayPrint(_R(Num).Bits); // Print fast bits

Like this? It's a uchar array where each element corresponding to a fast bit.

I think I've got it. There is an array of some type, it is converted into uchar array from fast-bits.

For example, array {1, 2, 4} -> array {7}. And the reverse conversion, of course.

 
fxsaber:
ArrayPrint(_R(Num).Bits); // Print fast bits

Like this? It's a uchar array where each element corresponding to a fast bit.

I think I've got it. There is an array of some type, it is converted into uchar array from fast-bits.

For example, array {1, 2, 4} -> array {7}. And the reverse conversion, of course.

there is struct

{
int type;
long time;
}

allow type=10, time=1486758079

byte representation will be
00000000 00000000 00000000 00001010 | 00000000 00000000 00000000 00000000 00000000 01011000 10011110 00100000 10111111

and as fast (exaggerated)

00001010 | 01011000 10011110 00100000 10111111

for a total of 5 bytes.Saves twice as much.

(there should be a stop bit separating the data, but you can see the general idea).
 
o_O:
there is struct

{
int type;
long time;
}

allow type=10, time=1486758079

byte representation will be
00000000 00000000 00000000 00001010 | 00000000 00000000 00000000 00000000 00000000 00000000 01011000 10011110 00100000 10111111

and in the form of fast (exaggerated)

00001010 | 01011000 10011110 00100000 10111111 (there should be a stop bit separating the data, but in general the essence is shown).
mention ASN.1 with its (her?) BER/DER/XDR encoding :-)
 
o_O:
00001010 | 01011000 10011110 00100000 10111111

for a total of 5 bytes. A twofold saving.

(there should still be a stop bit separating the data, but you can see the general idea).
It is not obvious what can serve as such a separator.
 
fxsaber:
It is not obvious just what can serve as such a divider.
http://www.jettekfix.com/node/36
Hello World Example | jettekfix.com
Hello World Example | jettekfix.com
  • www.jettekfix.com
To introduce the encoding and decoding process, we describe how a trivial message with only 1 field would be FAST encoded and decoded. Input Message Here's the message we'll start with: The SOH (ASCII 1) is the FIX separator byte. The Template This message requires a very simple template (expressed in XML and described in greater detail in...
 

If I understood correctly, it is proposed to make the 8th bit of each byte the separator.