home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / protocol / iso / 1365 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  1.2 KB

  1. Path: sparky!uunet!olivea!spool.mu.edu!umn.edu!email.sp.paramax.com!svcase.sp.paramax.com!not-for-mail
  2. From: scase@email.sp.paramax.com (Steve Case)
  3. Newsgroups: comp.protocols.iso
  4. Subject: Question on ASN.1 Encodings
  5. Message-ID: <1drej9INN8t8@svcase.sp.paramax.com>
  6. Date: 11 Nov 92 17:06:49 GMT
  7. Organization: Paramax -  Eagan, MN
  8. Lines: 25
  9. NNTP-Posting-Host: svcase.sp.paramax.com
  10.  
  11. I am trying to understand the various ASN.1 encoding and I cannot seem
  12. to understand how the indefinite form for the length octets can possibly
  13. work!  To make things simple, let me give you a specific example and
  14. hopefully someone can clarify the situation for me.
  15.  
  16. Let's assume we are encoding a bitstring value.  The particular bitstring
  17. to be encoded is '0900000009'H.  If I use the indefinite length format, 
  18. wouldn't this be encoded as follows:
  19.  
  20.    BitString Length Contents
  21.    23        80     000900000009
  22.  
  23.    EOC       Length
  24.    00        00
  25.  
  26.  
  27. My question, then, is when decoding this octet stream, how do you know
  28. that the bitstring is '0900000009'H and not '09'H or '090'H or '0900'H
  29. or '09000'H?  All three of these seem to be possible decodings?
  30.  
  31. Thank you for any assistance you might be able to give me.
  32.  
  33. Regards,
  34. Steve Case
  35. scase@planet8.sp.paramax.com
  36.