public byte[] coding(byte[] data) {
        int bufLen = data.length + (data.length + 6 ) / 7 ;
        ByteBuffer buf = ByteBuffer.allocate(bufLen);

        for(int i = 0; i != data.length; i++) {
            int right = (i % 7) + 1;
            int left = 7 - right;

            byte value = (byte)((data[i] & 0xFF) >> right);
            value |= convertByte;
            buf.put(value);

            convertByte = (byte)((data[i]<< left) & 0x7F);

            if(i % 7 == 6 || i == data.length - 1) {
                buf.put(convertByte);
                convertByte = 0x00;
            }
        }


        return buf.array();
    }