Article View: comp.protocols.iso.dev-environ
Article #673Question on ASN.1 Encodings
From: Steve Case
Date: Wed, 11 Nov 1992 17:13
Date: Wed, 11 Nov 1992 17:13
25 lines
1297 bytes
1297 bytes
I am trying to understand the various ASN.1 encoding and I cannot seem to understand how the indefinite form for the length octets can possibly work! To make things simple, let me give you a specific example and hopefully someone can clarify the situation for me. Let's assume we are encoding a bitstring value. The particular bitstring to be encoded is '0900000009'H. If I use the indefinite length format, wouldn't this be encoded as follows: BitString Length Contents 23 80 000900000009 EOC Length 00 00 My question, then, is when decoding this octet stream, how do you know that the bitstring is '0900000009'H and not '09'H or '090'H or '0900'H or '09000'H? All three of these seem to be possible decodings? Thank you for any assistance you might be able to give me. Regards, Steve Case scase@planet8.sp.paramax.com
Technical Details
Message-ID:
<1drf0lINN8up@svcase.sp.paramax.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!umn.edu!email.sp.paramax.com!svcase.sp.paramax.com!not-for-mailShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!umn.edu!email.sp.paramax.com!svcase.sp.paramax.com!not-for-mail From: scase@email.sp.paramax.com (Steve Case) Newsgroups: comp.protocols.iso.dev-environ Subject: Question on ASN.1 Encodings Message-ID: <1drf0lINN8up@svcase.sp.paramax.com> Date: 11 Nov 92 17:13:57 GMT Organization: Paramax - Eagan, MN Lines: 25 NNTP-Posting-Host: svcase.sp.paramax.com