Skip to content

main.aug ​

Compression with zlib · Source and specification

Files in this project

Code ​

aug
// aug-spec: "main.aug.md" explains this file. Read it before changes; refresh with aug spec.
import roundTrip from compression
import CompressionError from "https://github.com/GreenPandaStudios/aug-zlib#fce52e3bf536a304fab82d1d4b95ae425c027be1"
try:
    print(value=roundTrip().text())
catch CompressionError error:
    print(value=error.message)
catch ConversionError error:
    print(value="Invalid UTF-8")
aug
// aug-spec: "main.aug.md" explains this file. Read it before changes; refresh with aug spec.
import roundTrip from compression
import CompressionError from "https://github.com/GreenPandaStudios/aug-zlib#fce52e3bf536a304fab82d1d4b95ae425c027be1"
try {
    print(value=roundTrip().text())
}
catch CompressionError error {
    print(value=error.message)
}
catch ConversionError error {
    print(value="Invalid UTF-8")
}

Compiled specification ​

Interactions and sequences

Startup ​

It prints text on roundTrip. If this work raises CompressionError as error, it prints error.message. If this work raises ConversionError, it prints "Invalid UTF-8". source

Dependencies ​

It uses CompressionError (message) from https://github.com/GreenPandaStudios/aug-zlib#fce52e3bf536a304fab82d1d4b95ae425c027be1. It uses roundTrip from compression.

Built-in operations follow the language reference.

Last updated:

The world runs on language