preparing for bringing this all together

This commit is contained in:
2022-02-28 06:14:00 +02:00
committed by Motiejus Jakštys
parent 0b0e917086
commit 40deb3f0be
2 changed files with 28 additions and 16 deletions

View File

@@ -1,9 +1,8 @@
//
// varint64 []const u8 variants
//
// Thanks to https://github.com/gsquire/zig-snappy/blob/master/snappy.zig and golang's
// varint implementation.
// Thanks to https://github.com/gsquire/zig-snappy/blob/master/snappy.zig and
// golang's varint implementation.
const std = @import("std");
// compresses a strictly incrementing sorted slice of integers using delta
@@ -96,7 +95,7 @@ pub const Varint = struct {
bytesRead: usize,
};
const maxVarintLen64 = 10;
pub const maxVarintLen64 = 10;
// https://golang.org/pkg/encoding/binary/#Uvarint
pub fn uvarint(buf: []const u8) error{Overflow}!Varint {