#### Topic: The compact notation of binary number designation

Let there is a task in the beginning of some big file of the arbitrary content to write down a single whole number, too the arbitrary.
Problem in that behind record of this number (on a statement of the problem) there are any bits not dependent on it. How to specify, where number "body" terminates?
Obviously, different notations of record of this number are possible. For example, if binary record of this number consists from To bits, at first to put -1 units, then "0", then number. That is for number 255 we receive a type: "1111111011111111_..."
Whether more compact notation is possible?

#### Re: The compact notation of binary number designation

I so understand, what the number is not restricted on top? But any made boundary of an amount of bits in it is? 4kkk suffices? Select the first 4 bytes for an amount of bits of the number, then number, then an independent tail. 4 a little? Select 8 byte all the same so much for a disk is not located...

#### Re: The compact notation of binary number designation

M bit the size of number, To bit number, a body.
The size M fixed i.e. to select with a store that all possible To entered.

#### Re: The compact notation of binary number designation

Akina;
Number designation 1 occupies 8 byte + 1 bit? It is compact?

#### Re: The compact notation of binary number designation

FXS wrote:

number designation 1 occupies 8 byte + 1 bit? It is compact?

It is possible to write even the size of the size, for 2^64 6 bits is required
I.e. for number 1 record such:

``000001 1 1``

Only 1 byte

#### Re: The compact notation of binary number designation

FXS wrote:

whether more compact notation Is possible?

Aim to select it is necessary:  on the average or each time?
"Optimum coding" something can prompts (minimization for the purpose of transmission on communication channels is meant.)

#### Re: The compact notation of binary number designation

Dima T wrote:

It is possible to write even the size of the size, for 2^64 6 bits is required
I.e. for number 1 record such:

``000001 1 1``

Only 1 byte

And if the size of the size of the size to add, 6 bits suffices

``001 1 1 1``

:-D

#### Re: The compact notation of binary number designation

Dima T;
Yes, the size of the size, perhaps. That is it is necessary to find/prove somehow in more specific statements of the problem a choice - whether to be restricted _, or it is necessary even with __ to begin...

#### Re: The compact notation of binary number designation

FXS wrote:

Dima T;
Yes, the size of the size, perhaps. That is it is necessary to find/prove somehow in more specific statements of the problem a choice - whether to be restricted _, or it is necessary even with __ to begin...

For number designation in the size of 2^64 bits terrabyte is required to 2 million. I.e. it is possible to assume safely what to write more 2^64 precisely it is not required, the variant with the size of the size therefore suffices. About "the size of the size of the size" the joke was.

#### Re: The compact notation of binary number designation

FXS wrote:

Dima T;
Yes, the size of the size, perhaps. That is it is necessary to find/prove somehow in more specific statements of the problem a choice - whether to be restricted _, or it is necessary even with __ to begin...

Look at Kod Levenshtejna.

#### Re: The compact notation of binary number designation

Ivan FXS;
It is possible to use the following logic: for the number it is used 7 bits from 8 each bytes. The last byte has in the first bit 0, remaining bytes - 1.

#### Re: The compact notation of binary number designation

In BCD-arithmetics it is possible to save. Quickly  in the decimal.
Fibonacci it is possible to store in system. This variant easier than is assured by Levenshtejn that. Though
Probably less compact on great values.
Yes it is not enough-whether...

#### Re: The compact notation of binary number designation

The code of Levenshtejna in Vikipekdii is somehow boringly described, and I was too lazy to search for other description.

#### Re: The compact notation of binary number designation

Certainly it is not necessary to you to implement it. It is necessary to find ready implementation.
And  the it is really dreary. Especially regarding testing. And search of bugs
Already in implementation under different platforms. To any something gets out a paunch.
Roofing felts shift (&gt;&gt;) roofing felts bit operations roofing felts  that.
You by the way what for the ? Sports interest?

#### Re: The compact notation of binary number designation

Really I reflect about the archiver. On-diletantski, certainly.

#### Re: The compact notation of binary number designation

Ivan FXS, the useful subject. Especially when the data structures you create.
Some time ago I suggested a forum to write the utility for search
Unique lines in the big text file. And you will not check, how many
Ideas was. And Dime - thanks. And even angry Zjama was marked.
But here in what a piece. Any good idea demanded carefully
To think over as in storage to arrange data structures.  there.
Hashes-tablets... Trees. To find a gold proportion. And there still it is so much
Technical nuances - mum do not grieve. Both lines... And search and algorithmization
That I even postponed it for a year. And though own decisions
To itself - are obvious as noonday - but when
That these decisions go out and not  in an alpha the version. And you look
On them such also you think... And  generally it? So - that.

#### Re: The compact notation of binary number designation

mayton wrote:

Look at Kod Levenshtejna.

At first, Omega-kod Eliasa on one bit is more economic.
Secondly, both codes give saving for numbers less than 16, and cease to be economic for 16 and more.
That is, if numbers from 1 to 16 bit coding is justified prevail. If is not present, to encode in bytes or in other size of a word more effectively.

#### Re: The compact notation of binary number designation

ptr128;
Question not in coding in itself, and in that STILL to separate number designation from the following immediately behind it of the arbitrary bits.

#### Re: The compact notation of binary number designation

FXS wrote:

ptr128;
Question not in coding in itself, and in that STILL to separate number designation from the following immediately behind it of the arbitrary bits.

I understand it, but in what a problem, if coding not bit, and by words?
That is the length of the code is always multiple N bit, and the code allows to define an amount of words on N bit.
Even if a word at us of 8 bits (byte) completely not mandatory to align it on byte boundary in a file.

#### Re: The compact notation of binary number designation

FXS wrote:

Let there is a task in the beginning of some big file of the arbitrary content to write down a single whole number, too the arbitrary.
Problem in that behind record of this number (on a statement of the problem) there are any bits not dependent on it. How to specify, where number "body" terminates?
Obviously, different notations of record of this number are possible. For example, if binary record of this number consists from To bits, at first to put -1 units, then "0", then number. That is for number 255 we receive a type: "1111111011111111_..."
Whether more compact notation is possible?

here again it is possible to address to Shannon whom all it considered in 1945

#### Re: The compact notation of binary number designation

FXS wrote:

a question not in coding in itself, and in that STILL to separate number designation from the following immediately behind it of the arbitrary bits.

In  codings it is property is called . Optionally prefix in programmer sense. Is  determination, I do not remember only. In retelling - about that that is required.

#### Re: The compact notation of binary number designation

"" is about all substrings of a line. And here - only in one place, in the beginning of a line.

#### Re: The compact notation of binary number designation

Here is not present. It concerns the encoding technique (to a line encoded ). I implied that the row heading and actually a line "are coded" by different methods.

#### Re: The compact notation of binary number designation

ptr128 wrote:

it is passed...
At first, Omega-kod Eliasa on one bit is more economic.
Secondly, both codes give saving for numbers less than 16, and cease to be economic for 16 and more.
That is, if numbers from 1 to 16 bit coding is justified prevail. If is not present, to encode in bytes or in other size of a word more effectively.

In the first I at all against the codes of Eliasa.
In the second in the second your thesis there is an announcement about that that "to encode in bytes" more effectively. It is strange.
You actually refuted operations of Levenshtejna and Eliasa. That something to encode in bytes or in other size
Words you should return to the beginning and be defined with a range. And as the author was not defined yet
With a range - that to argue there is nothing. If you decided to encode in "bytes" that to you all the same it is necessary
Somewhere to store length of bytes and we inevitably we come to prefix either unary or any other methods
Codings.

#### Re: The compact notation of binary number designation

S.G. wrote:

here again it is possible to address to Shannon whom all it considered in 1945

Operations of Shannon concerned problems and calls which stood in the middle of 20th century.
Shannon operated with concept of "character". This concept arose long before byte or bit.
The character is an information unit in telegraph. In a telex. And in other simple devices
Communications which worked on  to channels.
At all without belittling operations of this remarkable engineer I will tell that he lived in the
Time also wrote about the. Both an urgency and applicability of its researches to the modern
To archivers - it is rather restricted. So as well as Donald Knuta's operations for the modern
The web developer. The material most part - is not necessary.