mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			282 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			282 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "lib/core/globals.h"
 | |
| #include "lib/core/bytes.h"
 | |
| #include <assert.h>
 | |
| 
 | |
| int main(int argc, const char* argv[])
 | |
| {
 | |
|     Bytes bytes;
 | |
|     ByteWriter bw(bytes);
 | |
|     BitWriter bitw(bw);
 | |
| 
 | |
|     bitw.push(0x1e, 5);
 | |
|     bitw.flush();
 | |
| 
 | |
|     assert(bytes == Bytes{0x1e});
 | |
| 
 | |
|     return 0;
 | |
| }
 |