Results 1 to 11 of 11

Thread: decode into text file

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Buffalo, NY, USA
    Posts
    5

    decode into text file

    K...

    I promised myself I'll never ask a stupid question .....

    ..but .... what the heck ....

    =======================================

    here's what I got in a file ....

    MTXA48

    .... and then some more ('bout 4 kB ) of weird special characters .... and occasionaly a regular char ....

    What I need to do is convert this mess into a text ...

    Is it posssible ....?
    Any ideas .... ( I'll be thankfull even for stupid ones )

    =======================================

    Thanx
    for whom the bell tolls

  2. #2
    Frenzied Member
    Join Date
    Aug 2001
    Posts
    1,075
    Sounds like a binary file. What are you expecting to get out of it?

    Greg
    Free VB Add-In - The Reference Librarian
    Click Here for screen shot and download link.

  3. #3
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Or maybe just a "normal" random access or sequential file containing non string elements such as integers, doubles etc... These values will appear in their binary equivalents eg Integer is 2 bytes or 2 chars (0-255) and is shown as the equivalent character in the character map. Long is 4 bytes etc... You would need to know the structure of the file to be able to decode it without too much effort.
    regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  4. #4
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    Smile Encode?

    Do you know how this "mess" got to the state it is? That meaning,
    do you know how the text got encoded? If you do, you can
    use that algorythm in reverse.
    Luke

  5. #5
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    I'm in front of the computer.
    Posts
    270
    If you're specifically trying to display binary data to the user, then you can convert each ascii code into a pair of hexits.
    Alphanos

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Buffalo, NY, USA
    Posts
    5
    here is what a part of the decoded file looks like

    #declare BallWood =
    material // BallWood
    {
    texture
    {
    pigment
    {
    wood
    color_map
    {
    [ 0.0 rgbft <0.888, 0.6, 0.3, 0.0, 0.0> ]
    [ 0.1 rgbft <0.888, 0.6, 0.3, 0.0, 0.0> ]
    [ 0.9 rgbft <0.7, 0.35, 0.2, 0.0, 0.0> ]
    [ 1.0 rgbft <0.7, 0.35, 0.2, 0.0, 0.0> ]
    }
    turbulence 0.06
    octaves 3
    ramp_wave
    scale <0.05, 0.75, 1.0>
    }
    }
    }

    now ... all I can see in the encoded file is "BallWood" .... and then ... well you know ...

    (maybe I could decode it character by character ...
    but is seems like uninteligent way .... even if comp does it for me)
    for whom the bell tolls

  7. #7
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    Red face Encode? Again?

    I dont think you understand what i mean. Did you encode this file
    to begin with? Do you have acess to how this file was encoded?
    Luke

  8. #8

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Buffalo, NY, USA
    Posts
    5
    First of all thanks for your patience macai...
    ( if I was you I'd probably get on a plane and kill myself for being so inarticulate)


    No I did not encode the file, nor do I have acces to how it got encoded.

    I converted each character of decoded file into hex, oct .. and what not..... than I did the same to encrypted file...

    tried to find a pattern .... ( guess I thought I'd be so lucky ) ....
    for whom the bell tolls

  9. #9
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    I'm in front of the computer.
    Posts
    270
    What exactly are you trying to do with this file?

  10. #10

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Buffalo, NY, USA
    Posts
    5
    K

    the file is actually a texture library for Moray
    ( http://www.stmuc.com/moray/ )

    what I wanna do is extract descriptions for textures I choose
    and then store them into a new texture library

    First I thought the textures would be stored in a text file
    so I'd just find the texture declaration .... and append the texture string to a new file ...

    but since the texture library is encrypted ....
    well .. it's kinda hard to find where one texture ends and other begins

    btw : the program does have the feature of appending new textures to the existing ones .... but I wanted the textures library to be updated automaticaly .... ( I wouldn't have to klick Export button .... )
    Last edited by Demian; Jan 7th, 2002 at 10:16 PM.
    for whom the bell tolls

  11. #11
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    I'm in front of the computer.
    Posts
    270
    Encoded and encrypted aren't the same thing. Its possible that you can still do what you want if you know what to look for in the file. Do you have any information about the details of the file format?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width