public function getSegmentKeys($all = false)
    {
        $keys = [];
        if ($all) {
            $keys = $this->segmentKeys;
        } else {
            foreach ($this->segmentKeys as $key => $bit) {
                if ($bit) {
                    $keys[] = $key;
                }
            }
        }
        return $keys;
    }