# std.compress.lzma2: optimize appendLz · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/90ac62cc751fa85bf572e281f65064bf2935ff9c)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 90ac62cc751fa85bf572e281f65064bf2935ff9c

Requested commit: 90ac62cc751fa85bf572e281f65064bf2935ff9c

Commit: 90ac62cc751fa85bf572e281f65064bf2935ff9c

Tree: 6bf43fb5ac293fd3728cd9a34c78c8fe5c51bfca

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.compress.lzma2: optimize appendLz

make the hot loop be a for loop without any failures or allocation.
change a O(N) addition into O(1)

```

## Parents

- [00b0beb682881da083b548423019483924736c1e](https://git.cafe/gitcafe/zig/commit/00b0beb682881da083b548423019483924736c1e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/90ac62cc751fa85bf572e281f65064bf2935ff9c?format=markdown)
