---
title: "onearchive cookbook"
url: https://recursiveai.org/onearchive/cookbook/
description: "Short recipes for common OneArchive tasks, each with complete code you can copy."
version: "0.7.0-preview.1"
---

# onearchive cookbook

Short recipes for common OneArchive tasks, each with complete code you can copy.

## Recipes

- [Extract untrusted archives](https://recursiveai.org/onearchive/cookbook/safe-extraction/index.md): Extract an archive a user uploaded with OneArchive, and see what its safe defaults refuse: a path that climbs out of the target, and an archive larger…
- [Zip files with AES encryption](https://recursiveai.org/onearchive/cookbook/zip-encryption/index.md): Write zip files with OneArchive that every zip tool opens, encrypt one with WinZip AES-256, and handle a missing or wrong password.
- [Zstandard dictionaries for small messages](https://recursiveai.org/onearchive/cookbook/zstd-dictionaries/index.md): Train a Zstandard dictionary with OneCompress on samples of small, similar messages, and compress new messages to a fraction of what plain Zstandard manages.
- [gzip that other tools read](https://recursiveai.org/onearchive/cookbook/gzip-interop/index.md): Compress with OneCompress’s gzip and read it with .NET’s GZipStream, and the other way round: the formats are the standard ones, byte for byte.
- [Read and write compound files](https://recursiveai.org/onearchive/cookbook/compound-files/index.md): Write a Microsoft compound file with OneArchive and read it back the same way as a .doc, .xls, .ppt or .msg file: storages are directories and streams are…
