diff --git a/libraries/networking/src/udt/PacketHeaders.cpp b/libraries/networking/src/udt/PacketHeaders.cpp index 50586e1057..f7e34f0671 100644 --- a/libraries/networking/src/udt/PacketHeaders.cpp +++ b/libraries/networking/src/udt/PacketHeaders.cpp @@ -32,34 +32,6 @@ const QSet NON_SOURCED_PACKETS = QSet() const QSet RELIABLE_PACKETS = QSet(); -int arithmeticCodingValueFromBuffer(const char* checkValue) { - if (((uchar) *checkValue) < 255) { - return *checkValue; - } else { - return 255 + arithmeticCodingValueFromBuffer(checkValue + 1); - } -} - -int numBytesArithmeticCodingFromBuffer(const char* checkValue) { - if (((uchar) *checkValue) < 255) { - return 1; - } else { - return 1 + numBytesArithmeticCodingFromBuffer(checkValue + 1); - } -} - -int packArithmeticallyCodedValue(int value, char* destination) { - if (value < 255) { - // less than 255, just pack our value - destination[0] = (uchar) value; - return 1; - } else { - // pack 255 and then recursively pack on - ((unsigned char*)destination)[0] = 255; - return 1 + packArithmeticallyCodedValue(value - 255, destination + 1); - } -} - PacketVersion versionForPacketType(PacketType packetType) { switch (packetType) { case PacketType::EntityAdd: @@ -123,10 +95,6 @@ QString nameForPacketType(PacketType packetType) { return QString("unexpected"); } -int numBytesForArithmeticCodedPacketType(PacketType packetType) { - return (int) ceilf((float) packetType / 255); -} - uint qHash(const PacketType& key, uint seed) { // seems odd that Qt couldn't figure out this cast itself, but this fixes a compile error after switch to // strongly typed enum for PacketType diff --git a/libraries/networking/src/udt/PacketHeaders.h b/libraries/networking/src/udt/PacketHeaders.h index 0cb20b2247..394ff01d4a 100644 --- a/libraries/networking/src/udt/PacketHeaders.h +++ b/libraries/networking/src/udt/PacketHeaders.h @@ -87,13 +87,6 @@ extern const QSet RELIABLE_PACKETS; QString nameForPacketType(PacketType packetType); PacketVersion versionForPacketType(PacketType packetType); -int numBytesForArithmeticCodedPacketType(PacketType packetType); -int numBytesForPacketHeaderGivenPacketType(PacketType packetType); -int packArithmeticallyCodedValue(int value, char* destination); - -int arithmeticCodingValueFromBuffer(const char* checkValue); -int numBytesArithmeticCodingFromBuffer(const char* checkValue); - uint qHash(const PacketType& key, uint seed); QDebug operator<<(QDebug debug, const PacketType& type);