# Siegfried WASM

This page demonstrates how to use siegfried's wasm build. You can download the latest sf.wasm file from the releases page.

The wasm file attaches an "identify" function into your environment.

Call this function with:

    identify(FileSystemHandle, ...options)

The return value is a Promise that resolves to a string value (results formatted in either JSON, YAML, CSV or DROID CSV).

The first argument to identify() must be a FileSystemHandle (file or directory). If you provide a directory, the identify function will walk the directory, and all its subdirectories, recursively, identifying all files within it.

You can add the following additional arguments in any order:

- the default output format is JSON but you can change that by giving "yaml", "csv", or "droid" as arguments
- to include checksums in your results, give either "md5", "sha1", "sha256", "sha512" or "crc" as arguments
- to decompress archive formats (zip, tar.gz, WARC, ARC), give "z" as an argument.

For example:

    identify(FSH, "z", "yaml", "sha1")

#### Try it

Format (format):

Hash (hash):

Scan within archives (z): true false

#### Results: