onearchiveCookbook
onearchive cookbook
Short recipes for common OneArchive tasks, each with complete code you can copy.
Recipes
Extract untrusted archivesExtract 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 than you allow.Zip files with AES encryptionWrite 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 messagesTrain 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 readCompress 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 filesWrite 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 files.