lib/steam/packets/SteamPacketFactory.php
/**
     * Reassembles the data of a split and/or compressed packet into a single
     * packet object
     *
     * @param array $splitPackets An array of packet data
     * @param bool $isCompressed whether the data of this packet is compressed
     * @param int $packetChecksum The CRC32 checksum of the decompressed
     *        packet data
     * @throws PacketFormatException if the calculated CRC32 checksum does not
     *         match the expected value
     * @return SteamPacket The reassembled packet
     * @see packetFromData()
     */
Reassembles the data of a split and/or compressed packet into a single
packet object


Reassembles the data of a split and / or compressed packet into a single packet object
public static function reassemblePacket($splitPackets, $isCompressed = false, $packetChecksum = 0) {
        $packetData = '';
        foreach($splitPackets as $splitPacket) {
            $packetData .= $splitPacket;
        }
        if($isCompressed) {
            $packetData = bzdecompress($packetData);
            if(crc32($packetData) != $packetChecksum) {
                throw new PacketFormatException('CRC32 checksum mismatch of uncompressed packet data.');
            }
        }
        $packetData = substr($packetData, 4);
        return self::getPacketFromData($packetData);
    }
public static function reassemblePacket ( $ splitPackets , $ isCompressed = false , $ packetChecksum = 0 ) { $ packetData = '' ; foreach ( $ splitPackets as $ splitPacket ) { $ packetData .= $ splitPacket ; } if ( $ isCompressed ) { $ packetData = bzdecompress ( $ packetData ) ; if ( crc32 ( $ packetData ) != $ packetChecksum ) { throw new PacketFormatException ( 'CRC32 checksum mismatch of uncompressed packet data.' ) ; } } $ packetData = substr ( $ packetData , 4 ) ; return self :: getPacketFromData ( $ packetData ) ; }
Reassembles the data of a split and/or compressed packet into a single
 packet object
Reassembles the data of a split and / or compressed packet into a single packet object