package eu.mais_h.sync;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

class CompressorFromSerializer<T> implements Compressor<T> {

  private final Serializer<T> serializer;

  CompressorFromSerializer(Serializer<T> serializer) {
    this.serializer = serializer;
  }

  @Override
  public Ibf compress(Set<T> input, int size) {
    List<MutableBucket> buckets = new ArrayList<MutableBucket>(size);
    for (T item : input) {
      byte[] content = serializer.serialize(item);
      for (int bucket : destinationBuckets(content)) {
        buckets.get(bucket).addItem(content);
      }
    }
    return null;
  }

  private int[] destinationBuckets(byte[] content) {
    return new int[0];
  }
}

@@ -421,16 +421,99 @@
 (size);%0A
+    for (int i = 0; i %3C size; i++) %7B%0A      buckets.add(new MutableBucket());%0A    %7D%0A
     for 

Initialize buckets