* freenode-connect Welcome to freenode. To protect the network all new connections will be scanned for vulnerabilities. This will not harm your computer, and vulnerable hosts will be notified. | 2019-07-05 17:58:34 |
*** complogger has joined the channel | 2019-07-05 17:58:40 |
<A barely detectible trace of hope> | Who knows - it just could be possible... </A barely detectible trace of hope> ||| IF YOU ASK A QUESTION, PLEASE REMAIN IN THE CHANNEL, IT MAY TAKE HOURS TO REPLY (AS TheStar IS OFTEN AFK), BUT HE WILL DO HIS BEST TO ANSWER... ||| Remembe". | 2019-07-05 17:58:40 |
*** Shelwien has joined the channel | 2019-07-05 17:58:53 |
*** Shelwien1 has joined the channel | 2019-07-05 19:45:52 |
*** Shelwien has left the channel | 2019-07-05 19:47:50 |
*** olpcda has joined the channel | 2019-07-06 12:35:05 |
*** olpcda has left the channel | 2019-07-06 13:05:32 |
*** unic0rn has left the channel | 2019-07-07 06:08:06 |
*** unic0rn has joined the channel | 2019-07-07 06:18:25 |
*** Shelwien1 has left the channel | 2019-07-07 11:07:04 |
*** ludde has left the channel | 2019-07-08 11:14:41 |
*** ludde has joined the channel | 2019-07-08 11:41:32 |
*** p_gimeno has joined the channel | 2019-07-08 17:45:19 |
<p_gimeno> | Imagine I need to encode an arbitrary length with as few bits as possible; the length is expected to have a geometric distribution (i.e. 0 happens the most, and the higher the number the rarer it is). | 2019-07-08 17:59:31 |
| One possible encoding is: alternating bits where the first one indicates if EOF, and when it's 0 (false), the next one is a part of the encoded length. | 2019-07-08 18:01:08 |
| So, for example, the bit sequence 0 a 0 b 0 c 0 d 0 e 1 is the 5-bit number abcde. | 2019-07-08 18:03:25 |
| This has several problems, one of which is there are multiple encodings for many values, which is of course not optimal. | 2019-07-08 18:05:45 |
| I think I have a solution for the multiple encodings problem: add an implicit 1 to the left of the N-bit number, and subtract 1 from the result to obtain the number to encode (I said length initially, let's talk just about an arbitrary number). | 2019-07-08 18:11:01 |
| so, the encoding for 0 would be 1, the encoding for 1 would be 001 (because in binary, 10 - 1 = 1), the encoding for 2 would be 011 (11 - 1 = 10), the encoding for 3 would be 00001 (100-1 = 11), the encoding for 4 would be 00011 (101-1=100), ..., the encoding for 32 would be 00000000011 (because 100001 - 1 = 100000)..., the encoding for 62 would be 01010101011 (111111 - 1 = 111110) and so on. | 2019-07-08 18:16:11 |
| That one does not waste bits in duplicate encodings, and I think it has a geometric distribution. Problem is, geometric distributions are characterized by a parameter, which is the probability of the first element, and the actual distribution can have a different parameter. | 2019-07-08 18:19:42 |
| IOW, that encoding can possibly be optimal (if at all) only for a geometric distribution with a certain parameter. | 2019-07-08 18:20:50 |
| Any ideas for other encodings offering a nearly-optimal distribution for other parameters? | 2019-07-08 18:21:47 |
| ok, that was more complex a question than I intended | 2019-07-08 18:37:00 |
<pepo> | p_gimeno, you probably want Golomb coding | 2019-07-08 22:56:06 |
<p_gimeno> | pepo: yes I do! Thanks for pointing me to them. That's exactly what I was after. | 2019-07-09 11:15:58 |
| them -> it | 2019-07-09 11:16:12 |
| and I just learned about truncated binary, which is very interesting on its own | 2019-07-09 11:20:56 |
| thanks again, bye! | 2019-07-09 19:19:58 |
*** p_gimeno has left the channel | 2019-07-09 19:20:08 |
*** pepo has left the channel | 2019-07-09 19:49:28 |
*** pepo has joined the channel | 2019-07-09 19:50:22 |
*** Shelwien has joined the channel | 2019-07-09 22:15:33 |
*** Shelwien1 has joined the channel | 2019-07-10 09:08:38 |
*** Shelwien has left the channel | 2019-07-10 09:10:02 |
*** ludde has left the channel | 2019-07-10 21:48:00 |
*** Shelwien has joined the channel | 2019-07-11 06:44:11 |
*** Shelwien1 has left the channel | 2019-07-11 06:45:48 |
*** Shelwien has left the channel | 2019-07-11 09:46:18 |
*** Shelwien has joined the channel | 2019-07-11 12:44:09 |
*** Shelwien has left the channel | 2019-07-12 08:00:50 |
*** Shelwien has joined the channel | 2019-07-12 08:01:10 |