0

I am in a design phase of an editor project. I always store files in binary format. However the requirement is, user must be able to click a button "Display Format" and the format of the file content should change from Binary to Hex, Decimal and vice-versa. What is the best way to do this? My files are really huge ones.

1

1 Answer 1

0

I would not read the file into memory but instead just keep an eye on where the offset of the top left corner of your editor is. Then just use random file access using Stream.Seek and to read that part of the file when needed and display it to the end user.

The actual conversion from hex, binary and octal is easy and the System.Convert.ToString(byte, int) is your friend here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.