Compresses and writes {@link #currentFrame} in a new StackMapTable entry.
434775
private void putFrame() {
    final int nLocal = currentFrame[1];
    final int nStack = currentFrame[2];
    if (symbolTable.getMajorVersion() < Opcodes.V1_6) {
      // Generate a StackMap attribute entry, which are always uncompressed.
      stackMapTableEntries.putShort(currentFrame[0]).putShort(nLocal);
      putAbstractTypes(3, 3 + nLocal);
      stackMapTableEntries.putShort(nStack);
      putAbstractTypes(3 + nLocal, 3 + nLocal + nStack);
      return;
    }
    final int offsetDelta =
        stackMapTableNumberOfEntries == 0
            ? currentFrame[0]
            : currentFrame[0] - previousFrame[0] - 1;
    final int previousNlocal = previousFrame[1];
    final int nLocalDelta = nLocal - previousNlocal;
    int type = Frame.FULL_FRAME;
    if (nStack == 0) {
      switch (nLocalDelta) {
        case -3:
        case -2:
        case -1:
          type = Frame.CHOP_FRAME;
          break;
        case 0:
          type = offsetDelta < 64 ? Frame.SAME_FRAME : Frame.SAME_FRAME_EXTENDED;
          break;
        case 1:
        case 2:
        case 3:
          type = Frame.APPEND_FRAME;
          break;
        default:
          // Keep the FULL_FRAME type.
          break;
      }
    } else if (nLocalDelta == 0 && nStack == 1) {
      type =
          offsetDelta < 63
              ? Frame.SAME_LOCALS_1_STACK_ITEM_FRAME
              : Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED;
    }
    if (type != Frame.FULL_FRAME) {
      // Verify if locals are the same as in the previous frame.
      int frameIndex = 3;
      for (int i = 0; i < previousNlocal && i < nLocal; i++) {
        if (currentFrame[frameIndex] != previousFrame[frameIndex]) {
          type = Frame.FULL_FRAME;
          break;
        }
        frameIndex++;
      }
    }
    switch (type) {
      case Frame.SAME_FRAME:
        stackMapTableEntries.putByte(offsetDelta);
        break;
      case Frame.SAME_LOCALS_1_STACK_ITEM_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_LOCALS_1_STACK_ITEM_FRAME + offsetDelta);
        putAbstractTypes(3 + nLocal, 4 + nLocal);
        break;
      case Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED:
        stackMapTableEntries
            .putByte(Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
            .putShort(offsetDelta);
        putAbstractTypes(3 + nLocal, 4 + nLocal);
        break;
      case Frame.SAME_FRAME_EXTENDED:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED).putShort(offsetDelta);
        break;
      case Frame.CHOP_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED + nLocalDelta).putShort(offsetDelta);
        break;
      case Frame.APPEND_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED + nLocalDelta).putShort(offsetDelta);
        putAbstractTypes(3 + previousNlocal, 3 + nLocal);
        break;
      case Frame.FULL_FRAME:
      default:
        stackMapTableEntries.putByte(Frame.FULL_FRAME).putShort(offsetDelta).putShort(nLocal);
        putAbstractTypes(3, 3 + nLocal);
        stackMapTableEntries.putShort(nStack);
        putAbstractTypes(3 + nLocal, 3 + nLocal + nStack);
    }
  }
837943
public void compress ()
    {
        for (Iterator<CountEntry<K>> it = _backing.values().iterator(); it.hasNext(); ) {
            if (it.next().count == 0) {
                it.remove();
            }
        }
    }
61148
private void writeSymbolMap(ByteBuf out) {
        Bzip2BitWriter writer = this.writer;

        final boolean[] blockValuesPresent = this.blockValuesPresent;
        final boolean[] condensedInUse = new boolean[16];

        for (int i = 0; i < condensedInUse.length; i++) {
            for (int j = 0, k = i << 4; j < HUFFMAN_SYMBOL_RANGE_SIZE; j++, k++) {
                if (blockValuesPresent[k]) {
                    condensedInUse[i] = true;
                }
            }
        }

        for (boolean isCondensedInUse : condensedInUse) {
            writer.writeBoolean(out, isCondensedInUse);
        }

        for (int i = 0; i < condensedInUse.length; i++) {
            if (condensedInUse[i]) {
                for (int j = 0, k = i << 4; j < HUFFMAN_SYMBOL_RANGE_SIZE; j++, k++) {
                    writer.writeBoolean(out, blockValuesPresent[k]);
                }
            }
        }
    }
1213652
AbstractMap.SimpleImmutableEntry<K,V> createSnapshot() {
            Object v = value;
            if (v == null || v == sentinel() || v == BASE_HEADER)
                return null;
            @SuppressWarnings("unchecked") V vv = (V)v;
            return new AbstractMap.SimpleImmutableEntry<K,V>(key, vv);
        }
111547
public void writeFrame(byte[] frame) throws IOException {
        lastUsedTime = System.currentTimeMillis();
        out.write(frame);
        out.flush();
    }
1149747
static Frame toFrame(Vector v, Key key) {
    final int log_rows_per_chunk = Math.max(1, FileVec.DFLT_LOG2_CHUNK_SIZE - (int) Math.floor(Math.log(1) / Math.log(2.)));
    Vec vv = makeCon(0, v.size(), log_rows_per_chunk, false /* no rebalancing! */);
    Frame f = new Frame(key, new Vec[]{vv}, true);
    try( Vec.Writer vw = f.vecs()[0].open() ) {
      for (int r = 0; r < v.size(); ++r)
        vw.set(r, v.get(r));
    }
    DKV.put(key, f);
    return f;
  }
499975
void saveFrame(ByteBuf frame) {
    if (upstreamFrameRefCnt == 0) {
      upstreamFrameRefCnt = frame.refCnt();
    }

    int frameSize = frame.readableBytes();
    long availableSize = cacheLimit - cacheSize;
    while (availableSize < frameSize) {
      ByteBuf cachedFrame = cachedFrames.poll();
      if (cachedFrame != null) {
        availableSize += releaseTailFrame(cachedFrame);
      } else {
        break;
      }
    }
    if (availableSize >= frameSize) {
      cachedFrames.offer(frame.retain());
      cacheSize += frameSize;
    } else {
      position += frameSize;
    }
  }
734947
private void writeBufferChain(BufferChainOutputStream bufferChain, boolean compressed) {
    ByteBuffer header = ByteBuffer.wrap(headerScratch);
    header.put(compressed ? COMPRESSED : UNCOMPRESSED);
    int messageLength = bufferChain.readableBytes();
    header.putInt(messageLength);
    WritableBuffer writeableHeader = bufferAllocator.allocate(HEADER_LENGTH);
    writeableHeader.write(headerScratch, 0, header.position());
    if (messageLength == 0) {
      // the payload had 0 length so make the header the current buffer.
      buffer = writeableHeader;
      return;
    }
    // Note that we are always delivering a small message to the transport here which
    // may incur transport framing overhead as it may be sent separately to the contents
    // of the GRPC frame.
    // The final message may not be completely written because we do not flush the last buffer.
    // Do not report the last message as sent.
    sink.deliverFrame(writeableHeader, false, false, messagesBuffered - 1);
    messagesBuffered = 1;
    // Commit all except the last buffer to the sink
    List<WritableBuffer> bufferList = bufferChain.bufferList;
    for (int i = 0; i < bufferList.size() - 1; i++) {
      sink.deliverFrame(bufferList.get(i), false, false, 0);
    }
    // Assign the current buffer to the last in the chain so it can be used
    // for future writes or written with end-of-stream=true on close.
    buffer = bufferList.get(bufferList.size() - 1);
    currentMessageWireSize = messageLength;
  }
1072838
public void putNextEntry(TarEntry entry) throws IOException {
        closeCurrentEntry();

        byte[] header = new byte[TarConstants.HEADER_BLOCK];
        entry.writeEntryHeader( header );

        write( header );

        currentEntry = entry;
    }
692939
private void visitFrameAfterOnMethodEntry() {
        if (!visitFramesAfterCallbacks)
            return;

        // The frame that is required after the trace guard must be
        // fully specified as 'this' is no longer an 'uninitialized this'
        if (isConstructor()) {
            List<Object> stackLocals = new ArrayList<Object>(argTypes.length + 1);
            stackLocals.add(classAdapter.getClassType().getInternalName());
            for (Type type : argTypes) {
                switch (type.getSort()) {
                    case Type.ARRAY:
                    case Type.OBJECT:
                        stackLocals.add(type.getInternalName());
                        break;
                    case Type.BOOLEAN:
                    case Type.CHAR:
                    case Type.BYTE:
                    case Type.SHORT:
                    case Type.INT:
                        stackLocals.add(INTEGER);
                        break;
                    case Type.LONG:
                        stackLocals.add(LONG);
                        break;
                    case Type.FLOAT:
                        stackLocals.add(FLOAT);
                        break;
                    case Type.DOUBLE:
                        stackLocals.add(DOUBLE);
                        break;
                }
            }
            visitFrame(F_FULL, stackLocals.size(), stackLocals.toArray(), 0, new Object[] {});
            visitInsn(NOP);
        } else {
            visitFrame(F_SAME, 0, null, 0, null);
            visitInsn(NOP);
        }
    }
998634
def writeEntry(bs)
      return if not @dirty
      cluster = @parentCluster; offset = @parentOffset
      buf = bs.getCluster(cluster)
      if @lfn_ents
        @lfn_ents.each {|ent|
          buf[offset...(offset + DIR_ENT_SIZE)] = BinaryStruct.encode(ent, DIR_ENT_LFN)
          offset += DIR_ENT_SIZE
          if offset >= bs.bytesPerCluster
            bs.putCluster(cluster, buf)
            cluster, buf = bs.getNextCluster(cluster)
            offset = 0
          end
        }
      end
      buf[offset...(offset + DIR_ENT_SIZE)] = BinaryStruct.encode(@dir_ent, DIR_ENT_SFN)
      bs.putCluster(cluster, buf)
      @dirty = false
    end
132130
private void writeEntry(HashtableEntry entry)

    throws IOException, EOFException, FileManagerException, ClassNotFoundException {

        long index = getHtindex(entry.index, entry.tableid);
        if (index == 0) { // first one in this bucket
            updateEntry(entry); // write to disk
            writeHashIndex(entry.index, entry.location, entry.tableid); // update index
        } else if (index == entry.location) { // replacing first entry
            updateEntry(entry);
            writeHashIndex(entry.index, entry.location, entry.tableid); // update index
        } else { // 
            //
            // If the entry has a "previous" pointer, then it was read earlier
            // from disk.  Otherwise, it is a brand new entry.  If it is a brand
            // entry, we write it to disk and chain at the front of the bucket.
            // If "previous" is not zero, we check to see if reallocation is
            // needed (location == 0).  If not, we simply update on disk and we're
            // done.  If reallocation is needed we update on disk to do the allocation
            // and call updatePointer to chain into the bucket.
            //
            if (entry.previous == 0) {
                entry.next = index;
                updateEntry(entry);
                writeHashIndex(entry.index, entry.location, entry.tableid); // update index
            } else {
                if (entry.location == 0) { // allocation needed?
                    updateEntry(entry); // do allocation
                    updatePointer(entry.previous, entry.location); // chain in
                } else {
                    updateEntry(entry); // no allocation, just update fields
                }
            }
        }

    }
3751
public void setExternalFrame(Shape current) {
		this.current = current;
		next = (Shape) shapes.get(0);
		offset = 0;
	}
232334
public synchronized void nextFrame() {
        currentFrame++;
        if(currentFrame >= frames.size()) {
            currentFrame = 0;
        }
        super.setLines(frames.get(currentFrame));
        invalidate();
    }
431491
public void write(ByteCodeWriter out)
    throws IOException
  {
    out.writeShort(_entries.size());

    for (int i = 1; i < _entries.size(); i++) {
      ConstantPoolEntry entry = _entries.get(i);

      if (entry != null)
        entry.write(out);
    }
  }
626007
private void putEntry(String key, CacheHeader entry) {
        if (!mEntries.containsKey(key)) {
            mTotalSize += entry.size;
        } else {
            CacheHeader oldEntry = mEntries.get(key);
            mTotalSize += (entry.size - oldEntry.size);
        }
        mEntries.put(key, entry);
    }
906750
def _push_writer(self):
        """"""

        buf = util.FastEncodingBuffer()
        self._buffer_stack.append(buf)
        return buf.write