Zinc: much more than HTTP server

Although Zinc HTTP Components is a framework for HTTP with full featured client and server implementations, it has long contained two sub packages that are independent of HTTP or even networking: Zinc-Resource-Meta (which implements URL and MimeType) and Zinc-Character-Encoding (for all kinds of character encoding).

While implementing the Pharo Unicode project, I made a couple of changes to Zinc-Character-Encoding.

The ZnCharacterEncoder hierarchy was refactored a bit with the introduction of ZnUTFEncoder and ZnEndianSensitiveUTFEncoder while a new encoder was added: ZnUTF32Encoder.

This means all official Unicode encoders, UTF-8, UTF-16 and UTF-32 are now supported. See the chapters ‘3.9 Unicode Encoding Forms’ and ‘3.10 Unicode Encoding Schemes’ in http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf

The API of the encoders was also extended to not only work between characters and bytes, but also between integer Unicode code points and bytes.

A refactoring was done regarding streams as well with the introduction of ZnEncodedStream and ZnEncoded[Read|Write]Stream above ZnCharacter[Read|Write]Stream and the addition of ZnCodePoint[Read|Write]Stream.

Summary: some new features, all public API remains the same.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: