The NBTCoder seems to handle all well-formatted NBT files well, but it has an issue where, if asked to decode a 0-byte file, it will break by crashing.
It would probably be useful if the NBTCoder would handle empty files by writing an empty human readable metadata.