

import { Buffer } from "./buffer.mjs";
import varint from "varint";

//#region src/utils/VarintEncoder.ts
var VarintEncoder = class VarintEncoder {
	static decode(data) {
		return [varint.decode(data), varint.decode.bytes];
	}
	static encode(int) {
		const target = new Buffer(VarintEncoder.encodingLength(int));
		varint.encode(int, target);
		return target;
	}
	static encodingLength(int) {
		return varint.encodingLength(int);
	}
};

//#endregion
export { VarintEncoder };
//# sourceMappingURL=VarintEncoder.mjs.map