@Override
    public final void mergeFrom(Input input, Map<K, V> map) throws IOException
    {
        MapWrapper<K, V> entry = null;
        for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
        {
            switch (number)
            {
                case 0:
                    // if(entry != null)
                    // entry.value = null;
                    return;
                case 1:
                    if (entry == null)
                    {
                        // lazy initialize
                        entry = new MapWrapper<K, V>(map);
                    }

                    if (entry != input.mergeObject(entry, entrySchema))
                    {
                        // an entry will always be unique
                        // it can never be a reference.
                        throw new IllegalStateException("A Map.Entry will always be " +
                                "unique, hence it cannot be a reference " +
                                "obtained from " + input.getClass().getName());
                    }
                    break;
                default:
                    throw new ProtostuffException("The map was incorrectly serialized.");
            }
        }
    }
Transfers the value from the input to the output.
protostuff-collectionschema/src/main/java/io/protostuff/MapSchema.java