Gets the compacted version from the sign and natural log.
762213
public static final double compact(long sign, double natlog) {
        return Double.longBitsToDouble(sign | (FLOAT_MASK & Double.doubleToRawLongBits(natlog)));
    }
24029
def get_entry_compact_text_repr(entry, entries):
    """"""
    text = get_shortest_text_value(entry)
    if text is not None:
        return text
    else:
        sources = get_sourced_from(entry)
        # There are a lot of references to this entity, each of which refer
        # to it by a different text label. For the sake of visualization,
        # let's pick one of these labels (in this case, the shortest one)
        if sources is not None:
            texts = []
            for source in sources:
                source_entry = entries[source]
                texts.append(get_shortest_text_value(source_entry))
            return get_shortest_string(texts)
239323
function getFormatChunksFrom (rawValues, prefix) {
      getFormatChunksFrom_accumulator.length = 0;

      var rawValuesLength = rawValues.length;
      var i;

      for (i = 0; i < rawValuesLength; i++) {
        getFormatChunksFrom_accumulator.push('_' + prefix + '_' + i);
      }

      return getFormatChunksFrom_accumulator;
    }
400621
private static long compactValFor(BigInteger b) {
        int[] m = b.mag;
        int len = m.length;
        if (len == 0)
            return 0;
        int d = m[0];
        if (len > 2 || (len == 2 && d < 0))
            return INFLATED;

        long u = (len == 2)?
            (((long) m[1] & LONG_MASK) + (((long)d) << 32)) :
            (((long)d)   & LONG_MASK);
        return (b.signum < 0)? -u : u;
    }
568375
private PageLeafImpl compact(TableKelp table)
  {
    long now = CurrentTime.currentTime() / 1000;
    
    Set<PageLeafEntry> entries = fillEntries(table);
    
    ArrayList<BlockLeaf> blocks = new ArrayList<>();
    BlockLeaf block = new BlockLeaf(getId());
    
    blocks.add(block);
    
    Row row = table.row();
    
    for (PageLeafEntry entry : entries) {
      if (entry.getCode() != INSERT && entry.getExpires() <= now) {
        continue;
      }

      while (! block.addEntry(row, entry)) {
        block = new BlockLeaf(getId());
        blocks.add(block);
      }
    }
    
    PageLeafImpl newPage = new PageLeafImpl(getId(), 
                                            getNextId(), 
                                            getSequence(),
                                            _table,
                                            getMinKey(), 
                                            getMaxKey(),
                                            blocks);
    
    newPage.validate(table);
    newPage.toSorted(table);
    
    if (isDirty()) {
      newPage.setDirty();
    }
    
    if (_stub != null) {
      _stub.copyToCompact(newPage);
    }

    return newPage;
  }
1208800
private void compactBySize() {
    if (maxLogSize > 0 && journal.size() > maxLogSize) {
      JournalSegment<LogEntry> compactSegment = null;
      Long compactIndex = null;
      for (JournalSegment<LogEntry> segment : journal.segments()) {
        Collection<JournalSegment<LogEntry>> remainingSegments = journal.segments(segment.lastIndex() + 1);
        long remainingSize = remainingSegments.stream().mapToLong(JournalSegment::size).sum();
        if (remainingSize > maxLogSize) {
          log.debug("Found outsize journal segment {}", segment.file().file());
          compactSegment = segment;
        } else if (compactSegment != null) {
          compactIndex = segment.index();
          break;
        }
      }

      if (compactIndex != null) {
        log.info("Compacting journal by size up to {}", compactIndex);
        journal.compact(compactIndex);
      }
    }
  }
1341925
def get_prefix(self):
        """"""
        prefix = self.bucket
        if self.prefix:
            prefix += self.delimiter + self.prefix
        return prefix
325111
def dmsToDeg(sign, deg, min, sec):
    """"""
    return sign * (deg + min * degPerDmsMin + sec * degPerDmsSec)
1361323
def _compact(*args):
    """"""
    ret = {}
    if len(args) == 1:
        args = args[0]
        if isinstance(args, ListValue):
            args = args.value
        if isinstance(args, dict):
            for i, item in args.items():
                if bool(item):
                    ret[i] = item
        elif bool(args):
            ret[0] = args
    else:
        for i, item in enumerate(args):
            if bool(item):
                ret[i] = item
    return ListValue(ret)
459038
def _getXrefString(self, xref, compressed=1):
        """"""
        if self.isClosed:
            raise ValueError("operation illegal for closed doc")

        return _fitz.Document__getXrefString(self, xref, compressed)
926559
def _get_canonical(self):
        """"""

        # Assemble major, minor, micro version and append `pre`, `post`, or `dev` if needed..
        if self.micro == 0:
            ver = "{}.{}".format(self.major, self.minor)
        else:
            ver = "{}.{}.{}".format(self.major, self.minor, self.micro)
        if self._is_pre():
            ver += '{}{}'.format(REL_MAP[self.release], self.pre)
        if self._is_post():
            ver += ".post{}".format(self.post)
        if self._is_dev():
            ver += ".dev{}".format(self.dev)

        return ver
1071429
private static MyNode compactForm(MyNode n) {
        if (n.node.getNodeType() == Node.TEXT_NODE) {
            n.out = n.node.getNodeValue().trim();
        } else {
            n.out = n.node.getNodeName();
            if (n.out.startsWith("m:")) {
                n.out = n.out.substring(2);
            }
            if ("annotation-xml".equals(n.out)) {
                n.out = "";
            }
            if ("pquery".equals(n.out) || "cquery".equals(n.out)) {
                n.out = "";
            }
            if ("mws:qvar".equals(n.out)) {
                final String qname = n.node.getAttributes().getNamedItem("name").toString();
                if (n.qVar == null) {
                    n.out = "\\qvar{x_0}";
                    n.qVar = new HashMap<>();
                    n.qVar.put(qname, 0);
                } else {
                    Integer qInt = n.qVar.get(qname);
                    if (qInt == null) {
                        n.out = "\\qvar{x_" + n.qVar.size() + "}";
                        n.qVar.put(qname, n.qVar.size());
                    } else {
                        n.out = "\\qqvar{x_" + qInt + "}";
                    }
                }
            }
            if (n.node.hasChildNodes()) {
                String sChild = "";
                for (Node childNode = n.node.getFirstChild();
                     childNode != null; childNode = childNode.getNextSibling()) {
                    MyNode ret = compactForm(new MyNode(childNode, n.qVar));
                    String cn = ret.out;
                    n.qVar = ret.qVar;
                    if (!cn.isEmpty()) {
                        sChild += cn + ";";
                    }
                }
                if (sChild.endsWith(";")) {
                    sChild = sChild.substring(0, sChild.length() - 1).trim();
                }
                if (!sChild.isEmpty() && sChild.codePointAt(0) != 8290 && sChild.codePointAt(0) != 8289) {
                    if ("m:annotation-xml".equals(n.node.getNodeName())) {
                        n.out += sChild;
                    } else {
                        n.out += '[' + sChild + ']';
                    }
                }
            }
        }
        if ("mo".equals(n.out)) {
            //Remove empty mo elements
            n.out = "";
        }
        return n;
    }
919918
function cleanup(err, compacted, activeCtx, options) {
    if(err) {
      return callback(err);
    }

    if(options.compactArrays && !options.graph && _isArray(compacted)) {
      // simplify to a single item
      if(compacted.length === 1) {
        compacted = compacted[0];
      }
      // simplify to an empty object
      else if(compacted.length === 0) {
        compacted = {};
      }
    }
    // always use array if graph option is on
    else if(options.graph && _isObject(compacted)) {
      compacted = [compacted];
    }

    // follow @context key
    if(_isObject(ctx) && '@context' in ctx) {
      ctx = ctx['@context'];
    }

    // build output context
    ctx = _clone(ctx);
    if(!_isArray(ctx)) {
      ctx = [ctx];
    }
    // remove empty contexts
    var tmp = ctx;
    ctx = [];
    for(var i = 0; i < tmp.length; ++i) {
      if(!_isObject(tmp[i]) || Object.keys(tmp[i]).length > 0) {
        ctx.push(tmp[i]);
      }
    }

    // remove array if only one context
    var hasContext = (ctx.length > 0);
    if(ctx.length === 1) {
      ctx = ctx[0];
    }

    // add context and/or @graph
    if(_isArray(compacted)) {
      // use '@graph' keyword
      var kwgraph = _compactIri(activeCtx, '@graph');
      var graph = compacted;
      compacted = {};
      if(hasContext) {
        compacted['@context'] = ctx;
      }
      compacted[kwgraph] = graph;
    }
    else if(_isObject(compacted) && hasContext) {
      // reorder keys so @context is first
      var graph = compacted;
      compacted = {'@context': ctx};
      for(var key in graph) {
        compacted[key] = graph[key];
      }
    }

    callback(null, compacted, activeCtx);
  }
90071
def transform_jsonld(self, obj):
        """"""
        rec = copy.deepcopy(obj)
        rec.update(self.context)
        compacted = jsonld.compact(rec, self.context)
        if not self.expanded:
            return compacted
        else:
            return jsonld.expand(compacted)[0]
373495
public function compactEditBuilder()
    {
        if ($this->relationships == 0 && $this->enum == 0) {
            return '';
        } else {
            $compact = '';
            if ($this->relationships > 0) {
                foreach ($this->fields as $field) {
                    if ($field->type == 'relationship') {
                        $compact .= ', "' . $field->relationship_name . '"';
                    }
                }
            }
            if ($this->enum > 0) {
                foreach ($this->fields as $field) {
                    if ($field->type == 'enum') {
                        $compact .= ', "' . $field->title . '"';
                    }
                }
            }

            return $compact;
        }
    }
675305
def GetRootFileEntry(self):
    
    path_spec = compressed_stream_path_spec.CompressedStreamPathSpec(
        compression_method=self._compression_method,
        parent=self._path_spec.parent)
    return self.GetFileEntryByPathSpec(path_spec)
523200
def getActiveCompactions(self, login, tserver):
    
    self.send_getActiveCompactions(login, tserver)
    return self.recv_getActiveCompactions()