-
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
-
Sounds like a binary file. What are you expecting to get out of it?
Greg
-
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
-
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. :)
-
If you're specifically trying to display binary data to the user, then you can convert each ascii code into a pair of hexits.
-
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)
-
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?
-
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 ) ....
-
What exactly are you trying to do with this file?
-
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 .... )
-
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?