ArticleslgStudy

science

Standard Compression Scheme for Unicode

Standard Compression Scheme for Unicode is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Standard Compression Scheme for Unicode rather than just read about it. In short: Standard Compression Scheme for Unicode (SCSU) is a Unicode Technical Standard for reducing the number of bytes needed to represent Unicode text, especially if that text uses mostly characters from one or a small number of per-language character blocks. It does so by dynamically mapping values in the range 128–255 to offsets within particular blocks of 128 characters.

Key takeaways

  • Standard Compression Scheme for Unicode belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Standard Compression Scheme for Unicode to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Standard Compression Scheme for Unicode from memory before moving on to harder problems.

Reference excerpt

Standard Compression Scheme for Unicode (SCSU) is a Unicode Technical Standard for reducing the number of bytes needed to represent Unicode text, especially if that text uses mostly characters from one or a small number of per-language character blocks. It does so by dynamically mapping values in the range 128–255 to offsets within particular blocks of 128 characters. The initial conditions of the encoder mean that existing strings in ASCII and ISO-8859-1 that do not contain C0 control codes other than NULL, TAB, CR and LF can be treated as SCSU strings. Since most alphabets reside in blocks of contiguous Unicode codepoints, texts that use small alphabets and either ASCII punctuation or punctuation that fits within the window for the main alphabet can be encoded at one byte per character (plus setup overhead, which for common languages is often only 1 byte); most other punctuation can be encoded at 2 bytes per symbol through non-locking shifts. SCSU can also switch to UTF-16 internally to handle non-alphabetic languages.

History & use Reuters originally developed SCSU, then under the name RCSU for Reuters Compression Scheme for Unicode. At first the Unicode Consortium considered it to be a character encoding, but in 1999 it revised this position: although it was still considered a transfer encoding syntax, for a while it was no longer considered a character encoding because different compressors might yield different outputs for the same text. However, in 2004 this decision was reverted, and SCSU is now considered a compressing character encoding scheme, as opposed to a simple or compound character encoding scheme. Roman Czyborra (of GNU Unifont) wrote a decompressor. The IBM-contributed decompressor is found in International Components for Unicode, along with a compressor written in Java. Simpler reference codecs are available as attachments to TR6. Symbian OS, an operating system for mobile phones and other mobile devices, uses SCSU to serialize strings. SQL Server 2008 R2 uses SCSU to compress Unicode values (in this case, strings in UCS-2 encoding) stored in nchar(n) and nvarchar(n) columns, achieving space savings of between 15% and 50%, depending on the language of the data (whereas UTF-8 achieves the 50% reduction only for the ASCII subset of Unicode).

The scheme The following sections briefly describe the anatomy of a compressed SCSU stream. For a full description (matching that of a decompressor), see the UTS #6 document.

Encoding modes SCSU starts in the single-byte mode, which uses the compressed Window encoding. There exist commands to switch to a UTF-16BE "Unicode" mode, and to switch to the single-byte mode from that mode.

Window encoding The core of SCSU lies in the windows for which the meanings of bytes 0x80-0xff are defined. There are eight static windows for simpler scripts and punctuation, and 6 types of dynamic windows (plus "half Unicode block" windows and custom windows for the supplementary planes) for scripts making use of more characters. Both simple and dynamic windows are selected by special command characters. For individual characters that do not fit into the current block, command characters for quoting are provided.

Comparison with general-purpose plain text compression schemes Because UTF-16 or UTF-8 text might occupy more space than its equivalent in pre-Unicode encodings did, compression such as SCSU can be used to mitigate this problem. In comparison with general-purpose compressors, it is not necessarily advantageous to use SCSU. Also, while it can be used as a text encoding, the stateful nature of the algorithm may cause difficulties when it is used as an internal text representation, since basic text operations become non-trivial. Treated purely as a compression algorithm, SCSU is inferior to most commonly used general-purpose algorithms for texts of over a few kilobytes. SCSU does have the advantage that it can usefully compress texts that are only a few characters long, whereas most full-scale compressors need hundreds of bytes of data to break even against their own overhead. In Symbian OS, SCSU is used even for Clipboard operations, e.g. Cut, Copy, and Paste of small strings of text.

Not for HTML W3C and WHATWG HTML standards prohibit supporting SCSU (and BOCU-1, CESU-8, UTF-7, EBCDIC, and UTF-32) in HTML documents because HTML was not designed with non-ASCII-compatible encodings in mind. In the past, cross-site scripting vulnerabilities due to browsers' poor handling of such encodings have been demonstrated.

See also Binary Ordered Compression for Unicode (BOCU-1) International Components for Unicode A library that can convert between SCSU and other Unicode encodings

References

Worked examples

Example 1 — a first encounter with Standard Compression Scheme for Unicode

Start with the simplest possible case. Write down what Standard Compression Scheme for Unicode claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Standard Compression Scheme for Unicode before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Standard Compression Scheme for Unicode ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Standard Compression Scheme for Unicode

In research
Standard Compression Scheme for Unicode appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Standard Compression Scheme for Unicode in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Standard Compression Scheme for Unicode is common in secondary-school and first-year university syllabi. It links to neighbouring topics Unicode Transformation Formats, so understanding it makes those chapters shorter.
In everyday life
Look for Standard Compression Scheme for Unicode outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Standard Compression Scheme for Unicode” →

How to study Standard Compression Scheme for Unicode in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Standard Compression Scheme for Unicode means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Standard Compression Scheme for Unicode out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Standard Compression Scheme for Unicode in simple terms?

Standard Compression Scheme for Unicode (SCSU) is a Unicode Technical Standard for reducing the number of bytes needed to represent Unicode text, especially if that text uses mostly characters from one or a small number of per-language character blocks. It does so by dynamically mapping values in t…

Why does Standard Compression Scheme for Unicode matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Standard Compression Scheme for Unicode?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Standard Compression Scheme for Unicode.

Tags

  • Unicode Transformation Formats

Keep exploring