Wrox Programmer Forums
|
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2005, 01:54 PM
Registered User
 
Join Date: Jul 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to HiddenFire Send a message via AIM to HiddenFire Send a message via MSN to HiddenFire Send a message via Yahoo to HiddenFire
Default Directly editing Binary

I'm new, just subscribed. I'm only an amateur programmer and only know the basics of vb.net. I've always been interested in encryption and recently got interested in compression. I've been able to make working encryptions and compressions by simply modifying the text in a file but as I'm sure is obvious, this is limited and slow. I must read each character, determine it's binary value, do the editing, change it back to decimal, then back to (an)other character(s)... it's slow, it's awkward, it's inaccurate, and it's a pain to program. My question isn't about anything specific but it is simple: "Is it possible to directly edit a file on the binary level? If so, how?"

It does not have to be in VB, I will gladly learn any programming language that will allow me to accomplish this. However, VB is comfortable for me. If I could be pointed in a direction I would greatly appreciate it. I've been searching the net for a while and asking all my programmer friends... no one seems to have an answer for me. My problem is that I don't know where to start.

Sorry for just diving right in and proclaiming my noob-ish-ness, but I'm pretty devoted to making these encryptions and compressions work as best as possible and I know that I won't be able to do that until I can directly edit files on the binary level.

also... I don't know anything about binary files, should there be anything I need to watch out for? Is there data therein that I should not touch?

anyway, I think that's just about it for now. Any help would be greatly appreciated.

Thanks,
HiddenFire/Nathaniel
 
Old July 5th, 2005, 03:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

did you read about encription algorith and compression???

there are a lot of algorith that do that without change the original!! are you saying that you are changing the original file??

i think you should start learning something like huffman trees.. that a basic method for compress...

also VB would be almost the worst languaje to try it...

and yes.. you can edit a binary file, but i don think you will accomplish anything usefull...

HTH

Gonzalo
 
Old July 5th, 2005, 04:28 PM
Registered User
 
Join Date: Jul 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to HiddenFire Send a message via AIM to HiddenFire Send a message via MSN to HiddenFire Send a message via Yahoo to HiddenFire
Default

I learned all I have about encryption on my own, I allready have the algorithms down, I just want to make it faster and work on files instead of just text as it does now.

I don't actually want to edit the original file. It would make a new file that is encrypted/compressed.

The compression is still in development (I've got it compressing but no way to know if it's doing it properly because I haven't coded the decompression algorithm yet).

I know VB isn't a very good language to be doing this in but I suppose the only reason I work with it is because it is what I know... and I like that I can build the gui so quick and easy.

This is what I am currently doing:
read a character, find it's ascii value, convert that value to binary, alter the value on the binary level, convert the new value(s) back to decimal and then return them as (a) new character(s).
it's just awkward.

I want to be able to just work on the binary level:
grab a binary value, alter the binary value, ouput new value.
MUCH simplier.

For the most part, I have been told that my encryptions are useless (too slow and awkward) and that my compression is little more than "interesting" but I'm not trying to make them usefull, I'm just doing this because I want to see if I can do it.

Thanks for the help, I'll look into huffman trees (allways willing to learn something new),
~HiddenFire/Nathaniel

 
Old July 6th, 2005, 12:11 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by gbianchi
 also VB would be almost the worst languaje to try it...

If you are going to insult a language, could you at least provide an alternative?
 
Old July 6th, 2005, 12:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

c is a better language to do that.. or c++..

and you really think im insulting the language?? i eat thanks to VB.. but for certain things is not the better choice...



HTH

Gonzalo





Similar Threads
Thread Thread Starter Forum Replies Last Post
just directly close the window kanoorani Javascript 1 May 5th, 2007 02:44 AM
just directly close the window kanoorani Javascript How-To 0 May 5th, 2007 12:13 AM
Printing directly leo_vinay ASP.NET 1.0 and 1.1 Basics 0 October 26th, 2005 11:17 PM
the record after x directly akhamis SQL Language 5 November 1st, 2004 03:00 AM
Printing directly to a printer Louisa VB.NET 2002/2003 Basics 4 January 16th, 2004 09:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.