944,098 Members | Top Members by Rank

Ad:
Jul 18th, 2006
0

converting a text or xml file into binary format

Expand Post »
i want to convert a file from text format to binary format using VB how can i achieve this
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
harish13 is offline Offline
4 posts
since Jul 2006
Jul 18th, 2006
0

Re: converting a text or xml file into binary format

I don't know exactly what you mean.... do you want to convert every letter to it's binary equivalent, so that A would be 1000001 (65 Dec)? If that is the case, you need to understand that your file is going to be like, 8 times bigger than normal. The reason for that, is because every character is about 1 byte. So, the letter A is 1 byte, and the number 1 is 1 byte. The number 0 is 1 byte, and the letter z is 1 byte. The character # is 1 byte, and so is the © and Җ characters. Your text file is already in Binary format.... 1000001 in Binary would actually display the letter A. So, if you want the program to replace each instance of A with 1000001 in the text file.... it's going to be taking up 7 extra bytes to represent the letter A.... because 1 is 1 byte, 0 is 1 byte, and A is 1 byte.

If you are talking about having code in a text file, and wanting to make it an EXE, that's a different story.....
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jul 19th, 2006
0

Re: converting a text or xml file into binary format

thank you for the reply.i got the solution.thank u
Reputation Points: 10
Solved Threads: 0
Newbie Poster
harish13 is offline Offline
4 posts
since Jul 2006
Jul 19th, 2006
0

Re: converting a text or xml file into binary format

Would you mind sharing, so the rest of the readers could get the same solution?
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Sep 3rd, 2009
0

Re: converting a text or xml file into binary format

Click to Expand / Collapse  Quote originally posted by Comatose ...
I don't know exactly what you mean.... do you want to convert every letter to it's binary equivalent, so that A would be 1000001 (65 Dec)? If that is the case, you need to understand that your file is going to be like, 8 times bigger than normal. The reason for that, is because every character is about 1 byte. So, the letter A is 1 byte, and the number 1 is 1 byte. The number 0 is 1 byte, and the letter z is 1 byte. The character # is 1 byte, and so is the © and Җ characters. Your text file is already in Binary format.... 1000001 in Binary would actually display the letter A. So, if you want the program to replace each instance of A with 1000001 in the text file.... it's going to be taking up 7 extra bytes to represent the letter A.... because 1 is 1 byte, 0 is 1 byte, and A is 1 byte.

If you are talking about having code in a text file, and wanting to make it an EXE, that's a different story.....
Or better still, use bytestream to read and convert the file to binary. I often do this when i need to store large files to database. I' m sure one would'n want to grow a thing 8-times bigger unless its money!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
agu.chux is offline Offline
3 posts
since May 2009
Nov 20th, 2011
0

XML to binary

For mining association rules from an XML document,it has to be converted into binary file..Then association rules are mined using the minimum support and confidence..Can anyone suggest an idea to do so..I have no idea how to convert XML data into Binary data..
Last edited by arthu rias; Nov 20th, 2011 at 1:40 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
arthu rias is offline Offline
1 posts
since Nov 2011
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: binary search difficulty
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Help me its Urgent





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC