package peergos.shared.user.fs;

/** A Fragment is a part of an EncryptedChunk which is stored directly in IPFS in a raw format block
 *
 */
public class Fragment {
    public static final int MAX_LENGTH = 512*1024; // max size allowed by bitswap protocol is 1 MiB

    public final byte[] data;

    public Fragment(byte[] data) {
        if (MAX_LENGTH < data.length)
            throw new IllegalStateException("fragment size "+ data.length +" greater than max "+ MAX_LENGTH);
        this.data = data;
    }
}

@@ -166,61 +166,22 @@
     
-public static final int MAX_LENGTH = 512*1024; // max
+// max message
  siz
@@ -217,13 +217,101 @@
  is 
-1
+2
  MiB
+, and the block must fit within that%0A    public static final int MAX_LENGTH = 1024*1024;
 %0A%0A  

Increase block size to 1 MiB