Skip to content

Commit

Permalink
Split Types class into several new classes
Browse files Browse the repository at this point in the history
the main benefit of this is the increased difficulty of accidentally
using the wrong byte order due to auto complete - now choosing byte
order is decided by the first character typed.

however, it also reduces the verbosity of the API, though I'm not sure
about the 'LE' and 'BE' class names.
  • Loading branch information
dktapps committed Apr 10, 2024
1 parent d0e71a3 commit 56673dd
Show file tree
Hide file tree
Showing 14 changed files with 182 additions and 160 deletions.
116 changes: 64 additions & 52 deletions classes/Types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,35 +106,33 @@ void ZEND_FASTCALL zif_writeType(INTERNAL_FUNCTION_PARAMETERS) {
}
}

PHP_METHOD(pmmp_encoding_Types, __construct) {
ZEND_NAMED_FUNCTION(pmmp_encoding_private_constructor) {
//NOOP
}

#define READ_FIXED_TYPE_FENTRY(zend_name, native_type, result_wrapper, arg_info) \
ZEND_RAW_FENTRY("read" zend_name "LE", (zif_readType<native_type, (readFixedSizeType<native_type, ByteOrder::LittleEndian>), result_wrapper>), arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("read" zend_name "BE", (zif_readType<native_type, (readFixedSizeType<native_type, ByteOrder::BigEndian>), result_wrapper>), arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
#define FIXED_TYPE_ENTRIES(zend_name, native_type, parse_parameters_wrapper, result_wrapper, arg_info_read, arg_info_write, byte_order) \
ZEND_RAW_FENTRY("read" zend_name, (zif_readType<native_type, (readFixedSizeType<native_type, byte_order>), result_wrapper>), arg_info_read, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("write" zend_name, (zif_writeType<native_type, parse_parameters_wrapper<native_type>, (writeFixedSizeType<native_type, byte_order>)>), arg_info_write, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)

#define READ_VARINT_FENTRY(size_name, unsigned_type, signed_type) \
ZEND_RAW_FENTRY("readUnsignedVar" size_name, (zif_readType<unsigned_type, (readUnsignedVarInt<unsigned_type>), zval_long_wrapper>), arginfo_read_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("readSignedVar" size_name, (zif_readType<signed_type, (readSignedVarInt<unsigned_type, signed_type>), zval_long_wrapper>), arginfo_read_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
//triad can't used readFixedSizeType because it's not a power of 2 bytes
#define TRIAD_ENTRIES(zend_name, native_type, byte_order) \
ZEND_RAW_FENTRY("read" zend_name, (zif_readType<native_type, readInt24<native_type, byte_order>, zval_long_wrapper>), arginfo_read_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("write" zend_name, (zif_writeType<native_type, zend_parse_parameters_long_wrapper<native_type>, writeInt24<native_type, byte_order>>), arginfo_write_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)

#define WRITE_FIXED_TYPE_FENTRY(zend_name, native_type, parse_parameters_wrapper, arg_info) \
ZEND_RAW_FENTRY("write" zend_name "LE", (zif_writeType<native_type, parse_parameters_wrapper<native_type>, (writeFixedSizeType<native_type, ByteOrder::LittleEndian>)>), arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("write" zend_name "BE", (zif_writeType<native_type, parse_parameters_wrapper<native_type>, (writeFixedSizeType<native_type, ByteOrder::BigEndian>)>), arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
#define LONG_ENTRIES(zend_name, unsigned_native, signed_native, byte_order) \
FIXED_TYPE_ENTRIES("Unsigned" zend_name, unsigned_native, zend_parse_parameters_long_wrapper, zval_long_wrapper, arginfo_read_integer, arginfo_write_integer, byte_order) \
FIXED_TYPE_ENTRIES("Signed" zend_name, signed_native, zend_parse_parameters_long_wrapper, zval_long_wrapper, arginfo_read_integer, arginfo_write_integer, byte_order) \

#define WRITE_VARINT_FENTRY(size_name, unsigned_type, signed_type) \
ZEND_RAW_FENTRY("writeUnsignedVar" size_name, (zif_writeType<unsigned_type, zend_parse_parameters_long_wrapper<unsigned_type>, (writeUnsignedVarInt<unsigned_type>)>), arginfo_write_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("writeSignedVar" size_name, (zif_writeType<signed_type, zend_parse_parameters_long_wrapper<signed_type>, (writeSignedVarInt<unsigned_type, signed_type>)>), arginfo_write_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
#define FLOAT_ENTRIES(zend_name, native_type, byte_order) \
FIXED_TYPE_ENTRIES(zend_name, native_type, zend_parse_parameters_double_wrapper, zval_double_wrapper, arginfo_read_float, arginfo_write_float, byte_order)

#define READ_WRITE_LONG_ENTRY(zend_name, unsigned_native, signed_native) \
READ_FIXED_TYPE_FENTRY("Unsigned" zend_name, unsigned_native, zval_long_wrapper, arginfo_read_integer) \
READ_FIXED_TYPE_FENTRY("Signed" zend_name, signed_native, zval_long_wrapper, arginfo_read_integer) \
WRITE_FIXED_TYPE_FENTRY("Unsigned" zend_name, unsigned_native, zend_parse_parameters_long_wrapper, arginfo_write_integer) \
WRITE_FIXED_TYPE_FENTRY("Signed" zend_name, signed_native, zend_parse_parameters_long_wrapper, arginfo_write_integer)
#define READ_VARINT_FENTRY(size_name, unsigned_type, signed_type) \
ZEND_RAW_FENTRY("readUnsigned" size_name, (zif_readType<unsigned_type, (readUnsignedVarInt<unsigned_type>), zval_long_wrapper>), arginfo_read_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("readSigned" size_name, (zif_readType<signed_type, (readSignedVarInt<unsigned_type, signed_type>), zval_long_wrapper>), arginfo_read_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)

#define READ_WRITE_FLOAT_ENTRY(zend_name, native_type) \
READ_FIXED_TYPE_FENTRY(zend_name, native_type, zval_double_wrapper, arginfo_read_float) \
WRITE_FIXED_TYPE_FENTRY(zend_name, native_type, zend_parse_parameters_double_wrapper, arginfo_write_float)
#define WRITE_VARINT_FENTRY(size_name, unsigned_type, signed_type) \
ZEND_RAW_FENTRY("writeUnsigned" size_name, (zif_writeType<unsigned_type, zend_parse_parameters_long_wrapper<unsigned_type>, (writeUnsignedVarInt<unsigned_type>)>), arginfo_write_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("writeSigned" size_name, (zif_writeType<signed_type, zend_parse_parameters_long_wrapper<signed_type>, (writeSignedVarInt<unsigned_type, signed_type>)>), arginfo_write_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)

#define READ_WRITE_VARINT_ENTRY(zend_name, unsigned_type, signed_type) \
READ_VARINT_FENTRY(zend_name, unsigned_type, signed_type) \
Expand All @@ -144,50 +142,64 @@ PHP_METHOD(pmmp_encoding_Types, __construct) {
ZEND_RAW_FENTRY("read" zend_name, (zif_readType<native_type, readByte<native_type>, zval_long_wrapper>), arginfo_read_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("write" zend_name, (zif_writeType<native_type, zend_parse_parameters_long_wrapper<native_type>, writeByte<native_type>>), arginfo_write_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)

#define READ_TRIAD_ENTRY(zend_name, native_type) \
ZEND_RAW_FENTRY("read" zend_name "BE", (zif_readType<native_type, readInt24<native_type, ByteOrder::BigEndian>, zval_long_wrapper>), arginfo_read_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("read" zend_name "LE", (zif_readType<native_type, readInt24<native_type, ByteOrder::LittleEndian>, zval_long_wrapper>), arginfo_read_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)

#define WRITE_TRIAD_ENTRY(zend_name, native_type) \
ZEND_RAW_FENTRY("write" zend_name "BE", (zif_writeType<native_type, zend_parse_parameters_long_wrapper<native_type>, writeInt24<native_type, ByteOrder::BigEndian>>), arginfo_write_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) \
ZEND_RAW_FENTRY("write" zend_name "LE", (zif_writeType<native_type, zend_parse_parameters_long_wrapper<native_type>, writeInt24<native_type, ByteOrder::LittleEndian>>), arginfo_write_integer, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
#define ENDIAN_ENTRIES(enum_case) \
LONG_ENTRIES("Short", uint16_t, int16_t, enum_case) \
LONG_ENTRIES("Int", uint32_t, int32_t, enum_case) \
\
FIXED_TYPE_ENTRIES("SignedLong", int64_t, zend_parse_parameters_long_wrapper, zval_long_wrapper, arginfo_read_integer, arginfo_write_integer, enum_case) \
\
FLOAT_ENTRIES("Float", float, enum_case) \
FLOAT_ENTRIES("Double", double, enum_case) \
\
TRIAD_ENTRIES("UnsignedTriad", uint32_t, enum_case) \
TRIAD_ENTRIES("SignedTriad", int32_t, enum_case)

ZEND_BEGIN_ARG_INFO_EX(empty_constructor_arg_info, 0, 0, 0)
ZEND_END_ARG_INFO()

#define READ_WRITE_TRIAD_ENTRY(zend_name, native_type) \
READ_TRIAD_ENTRY(zend_name, native_type) \
WRITE_TRIAD_ENTRY(zend_name, native_type)
static zend_function_entry byte_methods[] = {
ZEND_NAMED_ME(__construct, pmmp_encoding_private_constructor, empty_constructor_arg_info, ZEND_ACC_PRIVATE)

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_pmmp_encoding_Types___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
READ_WRITE_BYTE_ENTRY("Unsigned", uint8_t)
READ_WRITE_BYTE_ENTRY("Signed", int8_t)

static zend_function_entry byte_buffer_methods[] = {
PHP_ME(pmmp_encoding_Types, __construct, arginfo_class_pmmp_encoding_Types___construct, ZEND_ACC_PRIVATE)
PHP_FE_END
};

READ_WRITE_BYTE_ENTRY("UnsignedByte", uint8_t)
READ_WRITE_BYTE_ENTRY("SignedByte", int8_t)
static zend_function_entry big_endian_methods[] = {
ZEND_NAMED_ME(__construct, pmmp_encoding_private_constructor, empty_constructor_arg_info, ZEND_ACC_PRIVATE)

READ_WRITE_LONG_ENTRY("Short", uint16_t, int16_t)
READ_WRITE_LONG_ENTRY("Int", uint32_t, int32_t)
ENDIAN_ENTRIES(ByteOrder::BigEndian)
PHP_FE_END
};
static zend_function_entry little_endian_methods[] = {
ZEND_NAMED_ME(__construct, pmmp_encoding_private_constructor, empty_constructor_arg_info, ZEND_ACC_PRIVATE)

READ_FIXED_TYPE_FENTRY("SignedLong", int64_t, zval_long_wrapper, arginfo_read_integer)
WRITE_FIXED_TYPE_FENTRY("SignedLong", int64_t, zend_parse_parameters_long_wrapper, arginfo_write_integer)
ENDIAN_ENTRIES(ByteOrder::LittleEndian)
PHP_FE_END
};

READ_WRITE_FLOAT_ENTRY("Float", float)
READ_WRITE_FLOAT_ENTRY("Double", double)
static zend_function_entry varint_methods[] = {
ZEND_NAMED_ME(__construct, pmmp_encoding_private_constructor, empty_constructor_arg_info, ZEND_ACC_PRIVATE)

READ_WRITE_VARINT_ENTRY("Int", uint32_t, int32_t)
READ_WRITE_VARINT_ENTRY("Long", uint64_t, int64_t)

READ_WRITE_TRIAD_ENTRY("UnsignedTriad", uint32_t)
READ_WRITE_TRIAD_ENTRY("SignedTriad", int32_t)

PHP_FE_END
};

zend_class_entry* init_class_Types(void) {
void init_class_Types(void) {
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "pmmp\\encoding\\Types", byte_buffer_methods);
zend_class_entry* types_ce = zend_register_internal_class(&ce);
types_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
ce.ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;

INIT_NS_CLASS_ENTRY(ce, "pmmp\\encoding", "Byte", byte_methods);
zend_register_internal_class(&ce);

INIT_NS_CLASS_ENTRY(ce, "pmmp\\encoding", "BE", big_endian_methods);
zend_register_internal_class(&ce);

INIT_NS_CLASS_ENTRY(ce, "pmmp\\encoding", "LE", little_endian_methods);
zend_register_internal_class(&ce);

return types_ce;
INIT_NS_CLASS_ENTRY(ce, "pmmp\\encoding", "VarInt", varint_methods);
zend_register_internal_class(&ce);
}
2 changes: 1 addition & 1 deletion classes/Types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef TYPES_H
#define TYPES_H

zend_class_entry* init_class_Types(void);
void init_class_Types(void);

#endif
7 changes: 4 additions & 3 deletions tests/buffer-to-string.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ ByteBuffer may allocate more bytes than it needs in order to minimize allocation
<?php

use pmmp\encoding\ByteBuffer;
use pmmp\encoding\Types;
use pmmp\encoding\BE;
use pmmp\encoding\Byte;

$buffer = new ByteBuffer("");
Types::writeSignedIntBE($buffer, 0); //first buffer alloc, 4 bytes
Types::writeSignedByte($buffer, 0); //second buffer alloc, 8 bytes (used 5)
BE::writeSignedInt($buffer, 0); //first buffer alloc, 4 bytes
Byte::writeSigned($buffer, 0); //second buffer alloc, 8 bytes (used 5)

var_dump(bin2hex($buffer->toString()));

Expand Down
39 changes: 20 additions & 19 deletions tests/fixed-size-types.inc
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<?php

use pmmp\encoding\Types;
use pmmp\encoding\BE;
use pmmp\encoding\LE;

return [
[Types::readUnsignedShortLE(...), "\xff\xff"],
[Types::readSignedShortLE(...), "\xff\xff"],
[Types::readUnsignedShortBE(...), "\xff\xff"],
[Types::readSignedShortBE(...), "\xff\xff"],
[LE::readUnsignedShort(...), "\xff\xff"],
[LE::readSignedShort(...), "\xff\xff"],
[BE::readUnsignedShort(...), "\xff\xff"],
[BE::readSignedShort(...), "\xff\xff"],

[Types::readUnsignedIntLE(...), "\xff\xff\xff\xff"],
[Types::readSignedIntLE(...), "\xff\xff\xff\xff"],
[Types::readFloatLE(...), "\x11\xff\xff\x11"],
[Types::readUnsignedIntBE(...), "\xff\xff\xff\xff"],
[Types::readSignedIntBE(...), "\xff\xff\xff\xff"],
[Types::readFloatBE(...), "\x11\xff\xff\x11"],
[LE::readUnsignedInt(...), "\xff\xff\xff\xff"],
[LE::readSignedInt(...), "\xff\xff\xff\xff"],
[LE::readFloat(...), "\x11\xff\xff\x11"],
[BE::readUnsignedInt(...), "\xff\xff\xff\xff"],
[BE::readSignedInt(...), "\xff\xff\xff\xff"],
[BE::readFloat(...), "\x11\xff\xff\x11"],

[Types::readSignedLongLE(...), "\xff\xff\xff\xff\xff\xff\xff\xff"],
[Types::readSignedLongBE(...), "\xff\xff\xff\xff\xff\xff\xff\xff"],
[Types::readDoubleLE(...), "\x11\xff\xff\x11\x11\xff\xff\x11"],
[Types::readDoubleBE(...), "\x11\xff\xff\x11\x11\xff\xff\x11"],
[LE::readSignedLong(...), "\xff\xff\xff\xff\xff\xff\xff\xff"],
[BE::readSignedLong(...), "\xff\xff\xff\xff\xff\xff\xff\xff"],
[LE::readDouble(...), "\x11\xff\xff\x11\x11\xff\xff\x11"],
[BE::readDouble(...), "\x11\xff\xff\x11\x11\xff\xff\x11"],

[Types::readUnsignedTriadBE(...), "\xff\xee\xdd"],
[Types::readUnsignedTriadLE(...), "\xdd\xee\xff"],
[Types::readSignedTriadBE(...), "\xff\xee\xdd"],
[Types::readSignedTriadLE(...), "\xdd\xee\xff"],
[BE::readUnsignedTriad(...), "\xff\xee\xdd"],
[LE::readUnsignedTriad(...), "\xdd\xee\xff"],
[BE::readSignedTriad(...), "\xff\xee\xdd"],
[LE::readSignedTriad(...), "\xdd\xee\xff"],
];
10 changes: 5 additions & 5 deletions tests/negative-input-unsigned-varint.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ encoding
<?php

use pmmp\encoding\ByteBuffer;
use pmmp\encoding\Types;
use pmmp\encoding\VarInt;

$buffer = new ByteBuffer("");
Types::writeUnsignedVarInt($buffer, -1);
VarInt::writeUnsignedInt($buffer, -1);
$buffer->setReadOffset(0);
var_dump(Types::readUnsignedVarInt($buffer));
var_dump(VarInt::readUnsignedInt($buffer));

$buffer->setWriteOffset(0);
Types::writeUnsignedVarLong($buffer, -1);
VarInt::writeUnsignedLong($buffer, -1);
$buffer->setReadOffset(0);
var_dump(Types::readUnsignedVarLong($buffer));
var_dump(VarInt::readUnsignedLong($buffer));

?>
--EXPECT--
Expand Down
80 changes: 42 additions & 38 deletions tests/not-enough-bytes-fixed-size.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,72 +16,76 @@ foreach($functions as [$function, $buf]){
$buffer = new ByteBuffer("\x00");
$function($buffer);
}catch(DataDecodeException $e){
echo (new \ReflectionFunction($function))->getShortName() . " no offset: " . $e->getMessage() . "\n";
$reflect = new \ReflectionFunction($function);

echo $reflect->getClosureScopeClass()->getShortName() . "::" . $reflect->getName() . " no offset: " . $e->getMessage() . "\n";
}

try{
$buffer = new ByteBuffer($test);
$buffer->setReadOffset(15);
$function($buffer);
}catch(DataDecodeException $e){
echo (new \ReflectionFunction($function))->getShortName() . " with offset: " . $e->getMessage() . "\n";
$reflect = new \ReflectionFunction($function);

echo $reflect->getClosureScopeClass()->getShortName() . "::" . $reflect->getName() . " with offset: " . $e->getMessage() . "\n";
}

echo "\n";
}

?>
--EXPECT--
readUnsignedShortLE no offset: Need at least 2 bytes, but only have 1 bytes
readUnsignedShortLE with offset: Need at least 2 bytes, but only have 1 bytes
LE::readUnsignedShort no offset: Need at least 2 bytes, but only have 1 bytes
LE::readUnsignedShort with offset: Need at least 2 bytes, but only have 1 bytes

readSignedShortLE no offset: Need at least 2 bytes, but only have 1 bytes
readSignedShortLE with offset: Need at least 2 bytes, but only have 1 bytes
LE::readSignedShort no offset: Need at least 2 bytes, but only have 1 bytes
LE::readSignedShort with offset: Need at least 2 bytes, but only have 1 bytes

readUnsignedShortBE no offset: Need at least 2 bytes, but only have 1 bytes
readUnsignedShortBE with offset: Need at least 2 bytes, but only have 1 bytes
BE::readUnsignedShort no offset: Need at least 2 bytes, but only have 1 bytes
BE::readUnsignedShort with offset: Need at least 2 bytes, but only have 1 bytes

readSignedShortBE no offset: Need at least 2 bytes, but only have 1 bytes
readSignedShortBE with offset: Need at least 2 bytes, but only have 1 bytes
BE::readSignedShort no offset: Need at least 2 bytes, but only have 1 bytes
BE::readSignedShort with offset: Need at least 2 bytes, but only have 1 bytes

readUnsignedIntLE no offset: Need at least 4 bytes, but only have 1 bytes
readUnsignedIntLE with offset: Need at least 4 bytes, but only have 1 bytes
LE::readUnsignedInt no offset: Need at least 4 bytes, but only have 1 bytes
LE::readUnsignedInt with offset: Need at least 4 bytes, but only have 1 bytes

readSignedIntLE no offset: Need at least 4 bytes, but only have 1 bytes
readSignedIntLE with offset: Need at least 4 bytes, but only have 1 bytes
LE::readSignedInt no offset: Need at least 4 bytes, but only have 1 bytes
LE::readSignedInt with offset: Need at least 4 bytes, but only have 1 bytes

readFloatLE no offset: Need at least 4 bytes, but only have 1 bytes
readFloatLE with offset: Need at least 4 bytes, but only have 1 bytes
LE::readFloat no offset: Need at least 4 bytes, but only have 1 bytes
LE::readFloat with offset: Need at least 4 bytes, but only have 1 bytes

readUnsignedIntBE no offset: Need at least 4 bytes, but only have 1 bytes
readUnsignedIntBE with offset: Need at least 4 bytes, but only have 1 bytes
BE::readUnsignedInt no offset: Need at least 4 bytes, but only have 1 bytes
BE::readUnsignedInt with offset: Need at least 4 bytes, but only have 1 bytes

readSignedIntBE no offset: Need at least 4 bytes, but only have 1 bytes
readSignedIntBE with offset: Need at least 4 bytes, but only have 1 bytes
BE::readSignedInt no offset: Need at least 4 bytes, but only have 1 bytes
BE::readSignedInt with offset: Need at least 4 bytes, but only have 1 bytes

readFloatBE no offset: Need at least 4 bytes, but only have 1 bytes
readFloatBE with offset: Need at least 4 bytes, but only have 1 bytes
BE::readFloat no offset: Need at least 4 bytes, but only have 1 bytes
BE::readFloat with offset: Need at least 4 bytes, but only have 1 bytes

readSignedLongLE no offset: Need at least 8 bytes, but only have 1 bytes
readSignedLongLE with offset: Need at least 8 bytes, but only have 1 bytes
LE::readSignedLong no offset: Need at least 8 bytes, but only have 1 bytes
LE::readSignedLong with offset: Need at least 8 bytes, but only have 1 bytes

readSignedLongBE no offset: Need at least 8 bytes, but only have 1 bytes
readSignedLongBE with offset: Need at least 8 bytes, but only have 1 bytes
BE::readSignedLong no offset: Need at least 8 bytes, but only have 1 bytes
BE::readSignedLong with offset: Need at least 8 bytes, but only have 1 bytes

readDoubleLE no offset: Need at least 8 bytes, but only have 1 bytes
readDoubleLE with offset: Need at least 8 bytes, but only have 1 bytes
LE::readDouble no offset: Need at least 8 bytes, but only have 1 bytes
LE::readDouble with offset: Need at least 8 bytes, but only have 1 bytes

readDoubleBE no offset: Need at least 8 bytes, but only have 1 bytes
readDoubleBE with offset: Need at least 8 bytes, but only have 1 bytes
BE::readDouble no offset: Need at least 8 bytes, but only have 1 bytes
BE::readDouble with offset: Need at least 8 bytes, but only have 1 bytes

readUnsignedTriadBE no offset: Need at least 3 bytes, but only have 1 bytes
readUnsignedTriadBE with offset: Need at least 3 bytes, but only have 1 bytes
BE::readUnsignedTriad no offset: Need at least 3 bytes, but only have 1 bytes
BE::readUnsignedTriad with offset: Need at least 3 bytes, but only have 1 bytes

readUnsignedTriadLE no offset: Need at least 3 bytes, but only have 1 bytes
readUnsignedTriadLE with offset: Need at least 3 bytes, but only have 1 bytes
LE::readUnsignedTriad no offset: Need at least 3 bytes, but only have 1 bytes
LE::readUnsignedTriad with offset: Need at least 3 bytes, but only have 1 bytes

readSignedTriadBE no offset: Need at least 3 bytes, but only have 1 bytes
readSignedTriadBE with offset: Need at least 3 bytes, but only have 1 bytes
BE::readSignedTriad no offset: Need at least 3 bytes, but only have 1 bytes
BE::readSignedTriad with offset: Need at least 3 bytes, but only have 1 bytes

readSignedTriadLE no offset: Need at least 3 bytes, but only have 1 bytes
readSignedTriadLE with offset: Need at least 3 bytes, but only have 1 bytes
LE::readSignedTriad no offset: Need at least 3 bytes, but only have 1 bytes
LE::readSignedTriad with offset: Need at least 3 bytes, but only have 1 bytes
Loading

0 comments on commit 56673dd

Please sign in to comment.