Actually implement reading byte_arrays
All checks were successful
Build & Test / nix-build (push) Successful in 1m28s
All checks were successful
Build & Test / nix-build (push) Successful in 1m28s
This commit is contained in:
parent
80060b1708
commit
3bb8c5286a
@ -216,6 +216,11 @@ defmodule Amethyst.Minecraft.Read do
|
||||
{[data | acc], rest, :reversed}
|
||||
end
|
||||
|
||||
def byte_array({acc, data, :reversed}) do
|
||||
{[length], rest} = start(data) |> varint |> stop
|
||||
raw({acc, rest, :reversed}, length)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Reads a varint. `read` tracks the number of bytes read and `nacc` tracks the number being read.
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user