public void writeBytesDecreasing(byte[] value) {
    writeBytes(value, true);
  }
@Test
  public void testWriteBytesDecreasing() {
    byte[] first = {'a', 'b', 'c'};
    byte[] second = {'d', 'e', 'f'};
    byte[] last = {'x', 'y', 'z'};
    OrderedCode orderedCode = new OrderedCode();
    orderedCode.writeBytesDecreasing(first);
    byte[] firstEncoded = orderedCode.getEncodedBytes();
    assertArrayEquals(orderedCode.readBytesDecreasing(), first);

    orderedCode.writeBytesDecreasing(first);
    orderedCode.writeBytesDecreasing(second);
    orderedCode.writeBytesDecreasing(last);
    byte[] allEncoded = orderedCode.getEncodedBytes();
    assertArrayEquals(orderedCode.readBytesDecreasing(), first);
    assertArrayEquals(orderedCode.readBytesDecreasing(), second);
    assertArrayEquals(orderedCode.readBytesDecreasing(), last);

    orderedCode = new OrderedCode(firstEncoded);
    orderedCode.writeBytesDecreasing(second);
    orderedCode.writeBytesDecreasing(last);
    assertArrayEquals(orderedCode.getEncodedBytes(), allEncoded);
    assertArrayEquals(orderedCode.readBytesDecreasing(), first);
    assertArrayEquals(orderedCode.readBytesDecreasing(), second);
    assertArrayEquals(orderedCode.readBytesDecreasing(), last);

    orderedCode = new OrderedCode(allEncoded);
    assertArrayEquals(orderedCode.readBytesDecreasing(), first);
    assertArrayEquals(orderedCode.readBytesDecreasing(), second);
    assertArrayEquals(orderedCode.readBytesDecreasing(), last);
  }