Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function read_u8($hIn) {
- return ord(fRead($hIn, 1));
- }
- function read_u16($hIn) {
- return (
- (read_u8($hIn) << 0) +
- (read_u8($hIn) << 8)
- );
- }
- function read_u32($hIn) {
- return (
- (read_u8($hIn) << 0) +
- (read_u8($hIn) << 8) +
- (read_u8($hIn) << 16) +
- (read_u8($hIn) << 24)
- );
- }
- function read_str($hIn, $len) {
- return fRead($hIn, $len);
- }
- function read_str_null($hIn) {
- $str = '';
- while(($c = fRead($hIn, 1)) !== "\0") {
- $str .= $c;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement