# Installation

> StringZilla for C#

```sh
dotnet add package StringZilla
```

The package targets .NET 8+ (`net8.0`) and is NativeAOT- and trimming-compatible.
Native libraries for `win-x64`, `linux-x64`, `osx-arm64`, and more are bundled in the package.

```csharp
using StringZilla;

ReadOnlySpan<byte> text = "the quick brown fox"u8;
long position = Sz.IndexOf(text, "brown"u8); // first match, as a UTF-8 byte offset
ulong digest = Sz.Hash(text);                // fast 64-bit AES hash
```

All offsets are UTF-8 byte offsets, not UTF-16 char indices.
The zero-copy surface is `ReadOnlySpan<byte>`; `string` overloads transcode and are a convenience, not the fast path.
Buffer-filling operations write into a caller-provided `Span<T>` and return a count, so steady-state usage allocates nothing.

