You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Have the sources been updated in the publication?
to densely pack data and pass it around like a stock fast.
maybe make a class for TypeToBit operation ?
to densely pack data and transfer it by stock fast type.
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.
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.
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.
{
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).
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).
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 just what can serve as such a divider.
http://www.jettekfix.com/node/36
If I understood correctly, it is proposed to make the 8th bit of each byte the separator.