+ /* Gimme chunks till last one */
+ while (shuff_decode_chunk(shuff,chunk,4,&decoded))
+ fwrite(chunk,decoded,1,fp);
+
+ /* Last chunk written alone */
+ fwrite(chunk,decoded,1,fp);
+ fclose(fp);
+
+ /* Deinit decoder */
+ shuff_deinit_decoder(shuff);
+ free(shuff);
+ }
+
+ /* Free mem */
+ free(chunk);