

const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
require('./buffer.js');
let varint = require("varint");
varint = require_rolldown_runtime.__toESM(varint);
let buffer_index_js = require("buffer/index.js");
buffer_index_js = require_rolldown_runtime.__toESM(buffer_index_js);

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

//#endregion
exports.VarintEncoder = VarintEncoder;