2.2.5. Runtime Library

This document summarizes the types and function defined in Spicy’s standard runtime library. These can be accesses by importating the spicy module.

2.2.5.1. Types

spicy::AddrFamily
# IP address family.
type AddrFamily = enum { IPv4 = 1, IPv6 = 2 };
spicy::ByteOrder
# Byte-order.
type ByteOrder = enum { Little = 1, Big = 2, Network = 2, Host = 3 };
spicy::Filter
# Filter type.
type Filter = enum {
    BASE64 = 1,  # MIME base64 decoding.
    GZIP = 2,    # gzipd decompression.
    ZLIB = 3     # zlib/deflate decompression.
};

2.2.5.2. Functions

spicy::base64_encode
# Function for base64 encoding a bytes object.
import "HILTI-C" bytes base64_encode(b: bytes);
spicy::base64_decode
# Function for base64 decoding a bytes object.
import "HILTI-C" bytes base64_decode(b: bytes);