Hi, Assuming that you are actually encoding a stream being read through a buffer, the encoding can either be length of current buffer read from the stream and have a SEQUENCE of such chunks encoded. Though is easy, there is one more easy way.
Use indefinite length for OCTET STRING, keep appending the buffer reads to the encoded record and at the end of stream, append EOC octets. This would probably be the easiest way. Hope this addresses your requirement. regards, Sathya Narayanan S RPG Cellular Services Ltd. GSM : +91 98410 48051 > -----Original Message----- > From: QinPeng [SMTP:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 9:35 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: [ASN.1] How To encode length of Unconstrained OCTET STRING? > > hi,all! > How To encode length of Unconstrained OCTET STRING? > thanks a lot!
