home *** CD-ROM | disk | FTP | other *** search
- Path: 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
- Subject: Question on ASN.1 Encodings
- Message-ID: <1drej9INN8t8@svcase.sp.paramax.com>
- Date: 11 Nov 92 17:06:49 GMT
- Organization: Paramax - Eagan, MN
- Lines: 25
- NNTP-Posting-Host: svcase.sp.paramax.com
-
- 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
-