Logo

index : 0x2lib

Library extension for Jai

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/0x2lib.git/html/tests/bitpack.jai blob: 8e7e5e4916f75fb3f60c6145d78fae23a7b125bd [raw] [clear marker]

        
0
1
2
3run :: () -> bool {
4 packed := bits_pack(u8, 1, 2, 3, 4);
5
6 unpacked := bits_unpack(packed);
7 ass(unpacked, int.[1, 2, 3, 4]);
8
9 unpacked_by_index := bits_unpack_by_index(packed, 2);
10 ass(unpacked_by_index, 3);
11
12 return true;
13}
14
15
16#import "Basic";
17#import,file "../0x2_Bitpack.jai";
18
19#load "assertion.jai";
20
21
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit