OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: CDATA Section [binary data in...]

[ Lists Home | Date Index | Thread Index ]
  • From: "Gordon, Simon" <Simon.Gordon@swi.galileo.com>
  • To: XML-Dev Mailing list <xml-dev@ic.ac.uk>
  • Date: Fri, 29 Oct 1999 14:23:32 -0600

I found it at : http://www.normos.org/ietf/rfc/rfc2045.txt . Check out pages
23 - 25

Basically the encoder works like this:
Base64Table[] = "ABC...abc...1234567890+/"
ForEach 24 bits in input stream
    ForEach 6 bits in 24 bits
        OutputChar Base64Table[6 bit value]
    NextFor 6 bits
NextFor 24 bits

There are special cases when the input stream is not a multiple of 24 bits
long (the decoder has to know when to stop so the encoder outputs one or two
pad characters "=").

The decoder takes the input stream and outputs the corresponding 6 bit
values. When it encounters an equals, it commits what bits it has left into
a byte, clears the other bits, outputs the resulting byte and stops.

Regards,

Simon Gordon

-----Original Message-----
From: Simon St.Laurent [mailto:simonstl@simonstl.com]
Sent: Friday, October 29, 1999 13:22
To: XML-Dev Mailing list
Subject: RE: CDATA Section [binary data in...]


At 02:40 PM 10/29/99 -0400, Dan Vint wrote:
>I've seen reference to base64 many times now, where can I find a spec for
this?

Base64 is described in section 6.8 of RFC 2045, normally available at
http://www.ietf.org/rfc/rfc2045.txt. (I can't get the URL to open today,
though.)


Simon St.Laurent
XML: A Primer, 2nd Ed.
Building XML Applications
Inside XML DTDs: Scientific and Technical
Sharing Bandwidth / Cookies
http://www.simonstl.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN
981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS