-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bitstream.hx
43 lines (38 loc) · 918 Bytes
/
Bitstream.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
** Bitstream.hx
**
** Copyright (c) 2008 - 2013 Peter McQuillan
**
** All Rights Reserved.
**
** Distributed under the BSD Software License (see license.txt)
**
*/
class Bitstream
{
public var end : Int;
public var ptr : Int;
public var file_bytes : Int;
public var sr : Int;
public var error : Int;
public var bc : Int;
public var file : haxe.io.Input;
public var bitval : Int;
#if flash10
public var buf : flash.Vector < Int >;
#else
public var buf : Array <Int >;
#end
public var buf_index : Int;
public function new()
{
bitval = 0;
buf_index = 0;
#if flash10
buf = new flash.Vector(Defines.FILE_BYTES_SIZE,true);
#else
buf = new Array();
buf[Defines.FILE_BYTES_SIZE] = 0; // pre-size the array (one more than we need)
#end
}
}