public void encodeHeader(long size2mask, String name) {
        int size = (int) size2mask;

//        System.out.println("Taille size2mask en long " + size2mask + " taille size2mask en int " + (short) ((int) size2mask));
        encodeByte(0, (int) size2mask);
        encodeByte(12, size);
        encodeByte(8, size >> 8);
        encodeByte(4, size >> 16);
        encodeByte(0, size >> 24);
        for (int i = 0; i < name.length(); i++) {
            encodeByte(16 + i * 4, (short) name.charAt(i));
        }

    }