public function preceding(int $offset): string
    {
        $this->rewind();
        while ($this->valid()) {
            $previousElement = $this->getCurrentElement();
            $this->next();
            $currentElement = $this->getCurrentElement();
            if (($currentElement->getOffset() + $currentElement->getLength()) >= $offset) {
                return $previousElement->getOffset() + $previousElement->getLength();
            }
        }
        return $currentElement->getOffset() + $currentElement->getLength();
    }