public function writeFixed64(Stream $stream, $value) { $bytes = pack('V*', $value & 0xffffffff, $value / (0xffffffff + 1)); $this->writeBytes($stream, $bytes, 8); }
/** * @dataProvider providerFixed64 */ public function testComputeFixed64Size($value) { $stream = Stream::create(); $this->writer->writeFixed64($stream, $value); $streamSize = $stream->getSize(); $actualSize = $this->calculator->computeFixed64Size($value); $this->assertEquals($streamSize, $actualSize); }