[cifs-protocol] [EXTERNAL] RE: [REG:120060621000848] [MS-XCA] L77+Huffman negative huffman symbol update
jeffm at microsoft.com
Mon Jun 22 17:46:13 UTC 2020
Are there any specific parts that are particularly confusing? How far do you get with it?
Jeff McCashland | Senior Escalation Engineer | Microsoft Protocol Open Specifications Team
Phone: +1 (425) 703-8300 x38300 | Hours: 9am-5pm | Time zone: (UTC-08:00) Pacific Time (US and Canada)
Local country phone number found here: http://support.microsoft.com/globalenglish | Extension 1138300
We value your feedback. My manager is Jeremy Chapman (jeremyc), +1 (469) 775-2475
From: Aurélien Aptel <aaptel at suse.com>
Sent: Monday, June 22, 2020 9:59 AM
To: Jeff McCashland <jeffm at microsoft.com>; cifs-protocol at lists.samba.org
Cc: support <support at mail.support.microsoft.com>
Subject: RE: [EXTERNAL] RE: [REG:120060621000848] [MS-XCA] L77+Huffman negative huffman symbol update
I've read and reread this and MS-XCA multiple times over but I still cannot understand :(
Jeff McCashland <jeffm at microsoft.com> writes:
> We have some explanation of the pseudocode in question:
> A negative HuffmanSymbol indicates that the size of the value exceeds the value of the table (is > 64k). The location for the actual value is based of the decoded value:
> Each 16-bit entry in the table/tree follows this protocol:
> If the high bit is zero, the table/tree value is
> (decoded symbol) * 16 + (symbol bit length)
> If the high bit is one, the table/tree value is:
> -(index of tree node to decode remaining bits)
> The high bit being 1 is what makes the number negative.
The table has 2^15 entries. We know this from:
"The decoding table will have 2^15 entries because 15 is the maximum bit length permitted by the Xpress Compression Algorithm for a Huffman code."
The decoding table construction code indicates the same thing:
If CurrentTableEntry does not equal 2^15
The compressed data is not valid. Return with error.
Each entry index range from 0 to 2^15-1 (15 bits). *All* these indexes have the highest bit to zero (2^15-1 = 0111 1111 1111 1111). There cannot be any negative indexes.
Each entry value is in the range 0-511 ("For Symbol = 0 to 511"). There cannot be any negative values.
Could you double-check if the table construction pseudocode (not the final decoding) is up to date? It really seems like it is off.
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
More information about the cifs-protocol