Skip to content

Glossary

Short meanings for the words the guide uses. Each one ends with where korpress covers it.

abi3

Python extensions written in a compiled language are usually built once for each Python version. An abi3 build uses a stable subset of Python's C interface, so one file works on every Python from a minimum version onward.

In korpress: the regular wheels are built as abi3 for Python 3.10 and later, so one wheel covers 3.10 to 3.14. The free-threaded build needs its own wheel, see free-threaded. See Rust for the crate behind it.

ASI

Short for automatic semicolon insertion. JavaScript lets you leave out some semicolons, and the language puts them back where a line break makes a statement end. This means a line break can matter, so a minifier cannot always join two lines.

In korpress: the JavaScript minifier keeps the line breaks that ASI needs and drops the others. When it is unsure, it keeps the break. See JavaScript.

Boolean attribute

A boolean attribute in HTML is one that is on when it is there and off when it is not, such as disabled or checked. Its value does not matter, so disabled="" and disabled mean the same.

In korpress: the HTML minifier shortens a fixed list of them to the bare name, but not in XHTML. See What korpress changes.

Byte order mark

A byte order mark (BOM) is a few invisible bytes some editors put at the very start of a text file to say how it is encoded. In UTF-8 it is not needed, but it can be there.

In korpress: a UTF-8 byte order mark is read and left out of the output. See Limits and safety.

Cargo feature

An optional part of a Rust crate. You turn it on by name in Cargo.toml, and the code behind it is only built when you do.

In korpress: the python feature, which pulls in PyO3, is off by default, so the Rust library does not need it. See From Rust.

Conditional comment

An HTML comment that older versions of Internet Explorer read as an instruction, for example <!--[if IE]>...<![endif]-->. Other browsers see an ordinary comment.

In korpress: conditional comments are always kept, whatever you pass for remove_comments. See HTML.

Corpus

A large set of real files used to test a program on what people actually write, not only on cases you made up.

In korpress: the scripts in tests/corpus are run by hand on a folder of real files. They are not part of CI. See Limits and safety.

Crate

The name for a package of Rust code, like a package in Python. A crate can be a library that other code uses.

In korpress: one crate builds both the Rust library _korpress and the Python extension korpress._korpress. See From Rust.

Custom property

A CSS value you name yourself, written with two dashes (--brand: #fff) and read back with var(--brand). It can hold almost any text, and JavaScript can read it.

In korpress: because the text may matter, only comments and repeated spaces are removed from a custom property. See CSS.

Differential test

A test that runs the original and the changed version of something, and checks that the results are the same.

In korpress: the JavaScript tests run the original and the minified script in Node and compare what they print. See Limits and safety.

Free-threaded

A Python build, available from 3.13 and written 3.14t for 3.14, that runs without the global interpreter lock. Several threads can then run Python code at the same time. Compiled extensions have to be built for it.

In korpress: the tests run on 3.14t in CI, and the release builds separate wheels for it, because the abi3 wheels do not cover it. See abi3.

gzip and brotli

Two ways to compress a file for the web. A browser says which ones it understands in the Accept-Encoding header. gzip is understood everywhere and is in the Python standard library. brotli makes smaller files, but needs the brotli package in Python.

In korpress: korpress does not compress anything. The build script in With Korvex uses gzip, and brotli only if it is installed. See precompression.

In-place

Changing a file where it is, instead of writing the result to a new file. The old content is replaced.

In korpress: --in-place (or -i) overwrites each input file with its minified result. It cannot be used together with -o. See Command line.

Inline and block elements

In HTML, a block element, such as <p> or <div>, starts on a new line. An inline element, such as <b> or <a>, stays inside the line of text.

In korpress: a space between two blocks is not shown, so it is removed. A space between two inline tags is shown, so one space stays. See HTML.

Inline script and style

JavaScript and CSS written inside an HTML page, in a <script> or <style> element, or in a style="" attribute, instead of in a separate file.

In korpress: the HTML minifier passes them to the JavaScript and CSS minifiers. minify_css=False and minify_js=False turn this off. See HTML.

License comment

A comment at the top of a file that gives the license of the code. Many licenses ask you to keep it in the file you ship. In CSS and JavaScript it starts with /*!.

In korpress: license comments are kept by default. --strip-license on the command line drops them. See CSS and Command line.

Minifier

A tool that makes a file smaller without changing what it does. It removes comments, spaces and line breaks that the reader of the file, a browser here, does not need.

In korpress: three minifiers, for HTML, CSS and JavaScript. korpress does not rename variables or rewrite your logic. See What is korpress and Limits and safety.

Parser

A program that reads code and checks it against the grammar of the language, to build a syntax tree from it.

In korpress: there is no parser. The minifiers read each file once, from start to end, so they do not check that your code is valid. See Limits and safety and Syntax tree.

Precompression

Compressing a file once, ahead of time, and saving the result next to the original (app.css and app.css.gz), instead of compressing it on every request. The server only has to pick the right file. The highest compression level can be used, because the time does not matter.

In korpress: the build script in With Korvex minifies, then compresses, and Korvex serves the result with precompressed=True.

PyO3

A Rust library that lets Rust code be used as a Python module. It handles the move of values between the two languages.

In korpress: the Python extension is built with PyO3 and maturin. In the Rust library the python feature that needs PyO3 is off by default. See From Rust.

Regex and division ambiguity

In JavaScript, the character / can start a regular expression (/ab+c/) or be a division (a / b). Which one it is depends on what comes before it, and a wrong guess can cut a file in the wrong place.

In korpress: the JavaScript minifier decides from the previous significant token, and from a small record of what each ( and { belonged to. See JavaScript.

Stdin and stdout

Standard input and standard output are the two streams a command line program reads from and writes to. By default they are the keyboard and the screen. With a pipe (|), the output of one program becomes the input of the next.

In korpress: with one file and no other option, the result goes to stdout. With no path, korpress reads stdin, and you must give -t. See Command line.

A symbolic link: a file that is only a pointer to another file or folder.

In korpress: --in-place on a symlink minifies the file it points to, and the symlink stays a symlink. See Limits and safety.

Syntax tree

A map of how code is built, with each statement and expression as a branch. A parser makes it. It is also called an AST, for abstract syntax tree. A tool that has one can prove that a rewrite is safe.

In korpress: there is none, so korpress does not rename or remove code. The tests compare syntax trees from another tool (acorn) before and after. See JavaScript.

Template literal

A JavaScript string written between backticks. It can span several lines and hold ${...} expressions, and spaces and line breaks inside it are part of the value.

In korpress: the content of a template literal is copied as it is, ${...} included. An unterminated one is an error. See JavaScript and The error type.

Token

The smallest piece of code that has a meaning on its own: a word, a number, a string, a regular expression, a template or a punctuation mark.

In korpress: the JavaScript minifier reads a file as a list of tokens and writes them back with fewer spaces. See JavaScript.

Void tag

An HTML tag that never has content or a closing tag, such as <br>, <hr>, <img> and <input>.

In korpress: the slash is removed, so <br/> becomes <br>. In XHTML it is kept. See HTML.

Whitespace collapsing

Replacing a run of spaces, tabs and line breaks with one space, or with nothing when the browser would not show it anyway, as next to a block tag like <div>. It is not done inside <pre> and <textarea>, where whitespace is shown.

In korpress: this is what the HTML minifier does to text, and the CSS minifier does the same around selectors and values. collapse_whitespace turns it off in HTML. See HTML and CSS.

XHTML

A strict form of HTML that follows the rules of XML. Every attribute has quotes, and empty tags end with />. A document that starts with <?xml is XHTML.

In korpress: such a document keeps the quotes and the />, and boolean attributes are not shortened. See HTML.