/** * Decode a BitMap field * * @param \LibDNS\Decoder\DecodingContext $decodingContext * @param \LibDNS\Records\Types\BitMap $bitMap The object to populate with the result * @param int $length * @return int The number of packet bytes consumed by the operation * @throws \UnexpectedValueException When the packet data is invalid */ private function decodeBitMap(DecodingContext $decodingContext, BitMap $bitMap, $length) { $bitMap->setValue($this->readDataFromPacket($decodingContext->getPacket(), $length)); return $length; }
/** * Encode a BitMap field * * @param \LibDNS\Records\Types\BitMap $bitMap * @return string */ private function encodeBitMap(BitMap $bitMap) { return $bitMap->getValue(); }