Replaced encode/decode printf with PRId64.