Rocky_Mountain_Vending/.pnpm-store/v10/files/86/6e593486eb9901625b3c43faf206da4747c16b1f5c8b5de778d9f28b06139c6e0bf0a6e902c187979c431edc11a938598c9bac8a5a25bb4645aa17dfda1354
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

37 lines
1.1 KiB
Text

export function printBytes(bytes) {
return [...bytes].map((n) => {
const pad = (num) => ("0".repeat(8) + num.toString(2)).slice(-8);
const b = pad(n);
const [maj, min] = [b.slice(0, 3), b.slice(3)];
let dmaj = "";
switch (maj) {
case "000":
dmaj = "0 - Uint64";
break;
case "001":
dmaj = "1 - Neg Uint64";
break;
case "010":
dmaj = "2 - unstructured bytestring";
break;
case "011":
dmaj = "3 - utf8 string";
break;
case "100":
dmaj = "4 - list";
break;
case "101":
dmaj = "5 - map";
break;
case "110":
dmaj = "6 - tag";
break;
case "111":
dmaj = "7 - special";
break;
default:
dmaj = String(parseInt(maj, 2));
}
return `${maj}_${min} (${dmaj}, ${parseInt(min, 2)})`;
});
}