Mismatch in original structure of the file-content to the same file served on rest api end point

The original file is of binary format. The extension of the file is “.tx”. I have seen your reply here How to read and write binary files?.