yDec - The freeware decoder for yEncode
yDec is a small application which extracts yEncoded binaries
from a file and writes them to the harddisk.
The Windows version is is a console program - and can be also
used with drag and drop.
The program - and sourcecode - are public domain - and have been
ported also to other operating systems.
Non-technical users want to use instead the "TyDecoder" or "yEnc32" (all freeware) from: http://www.yenc32.com
Known problems with yDec.exe
Spaces are not permitted in the directory.
If you are using the Commandline tool YDEC.EXE for Windows
then use a temporary directory which does NOT have spaces in the
path:
Use: c:\temp
Dont use: c:\own files
yDec leaves empty xxxx.dec files on disk after multipart decoding
After decoding a multipart the file "xxxx.dec" stays there with a size of zero bytes. This has been done intentionally - but will be fixed.
Illegal filenames
Illegal filenames in a yEncoded message (containing colons and
backslashes) prevent yDec from decoding the file.
However you could still open the message (or the first message of
a multipart) with Wordpad and change the filename manually.
Usage of yDec
- Download the yDec.zip (link below) and extract the yDec.exe to any working directory. (Example: c:\ydec)
- Use the function "File - Save as"
in your newsreader to store a message which contains
yEncoded binaries into the same directory.
It is helpful to use the .TXT file extension. (Example: msg1.txt - Directory: c:\ydec) - Open a command-line window (or DOS-Window)
- Change to the temporary directory: (Example: cd c:\ydec)
- Start the decoder: ydec msg1.txt
- You can also store ten messages (msg1.txt, msg2.txt, ... msg10.txt) and use a wildcard as parameter: ydec *.txt
- yDec writes the extracted files into the same directory.
- Remove the stored message-text-files (Or keep them as backup).
- Store the decoded binaries to another directory.
yDec can also be used with 'Drag and Drop' on Windows: You can simply click ONE stored message file and drag it to the yEnc.exe. You can also create a shortcut for yDec on your desktop and drag a message file to that icon. The decoded binaries will still be stored at the location where the message file comes from! Dont try to drag multiple messages to yDec. It does not work.
Special cases
- Corrupt messages (size error):
If yDec detects yEncoded attachments which are corrupt and have a wrong size then it still stores the attachment - but it extends the filename with the (size=#####) label.
NEVER repost or forward such corrupt binaries ! - Corrupt messages (crc error):
If yDec detects yEncoded attachments which are corrupt and have a wrong CRC then it still stores the attachment - but it extends the filename with the (crc=abcdef) label.
NEVER repost or forward such corrupt binaries !
Multipart handling
If you receive a multipart message which is yEncoded then you have two choices:
- You save each message (File - Save as)
as an individual file to the temporary decoder directory
(part1.txt, part2.txt, .. part69.txt)
Then you instruct yDec to decode all messages with a wildcard-command. Example: ydec part*.txt - You tell your newsreader to combine all the parts and
store them as ONE big file to the decoder directory (bigfile.txt).
Then you instruct yDec to decode this big file. Example: ydec bigfile.txt
If the decoding can be completed without problems then the binary is written to the directory and an empty file with such a filename: orid-filename.ext(123456).dec are created. You can use the written file and remove the 'dec' file.
Missing parts
If yDec detects multipart messages then it instantly creates the FULL file - even if parts are missing. If (for example) the file: music.mp3 comes in 10 parts and the yDecoder finds one of them (not necessarily the first one) then it creates two temporary files:
music.mp3(1234567).tmp - and - music.mp3(1234567).dec
(The number is the size of the file). The first file is the temporary file which contains already the first part (and the rest is filled with 0xFF - decimal 255 - numbers). The second file is the information which bytes are still missed! As long as the extension of filename is (1234567).tmp as long the file is not yet complete! Perhaps some parts were corrupt - or simply not there.
If you are missing parts then you can get them later - and store them to your decoder directory. Then start yDec again on these new parts. The decoder will _automatically_ detect that additional parts are there - and insert them into the temporary file. As soon as the file gets complete the DEC file is empty and the TMP filename is changed to the real filename.
You should _never_ edit the DEC-file manually. This will simply cause problems.
Possible problem: If someone reposts a different
binary under the identical name with the identical size then the
decoder might fail !
If someone reposts the identical binary but in different part
sizes then yDec is able to fill whatever is still necessary.
Duplicate filenames
If yDec is decoding a binary and its filename is already used - because there is still another file with that name - then it does NOT overwrite the old file. It issues a warning. Be sure to remove decoded files (and the message-files) after a job is done.
Debug display
If you want to see all the details of the running decoder then you can use the commandline switch /a:
yDec msg1.txt /a | Decodes the message and shows all output in the DOS window |
yDec *.txt /a | Decodes all the files with the extension *.txt |
yDec *.txt /a | more | Decodes everything and permits paging in the results |
yDec *.txt /a > log.txt edit log.txt |
Docdes everything and writes the progress to the
logfile. The EDIT command allows to review the results. |
Download
- yDec v1 for Windows 95/98/ME/NT/2000/XP
- yDec sourcecode (public domain)
- yDec for Mac (see Apple pages)
- yDec for Linux (see Linux pages)
More links
- MyNews (www.winews.net) is a windows based news-tools which can autopost and decode yEncoded binaries (and much more ;-)
- yEncode (www.ydec.org) is a compact encoding for binary Usenet messages
Developers contact:
For questions about yDec and yEncoding feel free to contact me: yenc@infostar.de
Portation to other OS is highly appreciated !
Feel free to improve yDec - with a windows desktop or otherwise.
The DEC file format (multipart decoding details)
yDec is creating a DEC file which contains info about missing sections while decoding a multipart. Here an example for better understanding:
If a binary with the size 200000 bytes is posted as a multipart then the DEC file contains just this one line:
- 1,200000
This indicates that the bytes 1-200000 are not present.
If now one part is properly decoded which contains the bytes
[5001-10000] then the DEC file is changed to:
- 1,5000
- 10001,200000
If now the 'first' part which contains the bytes [1-5000] is found the the DEC file is changed to:
- 10001,200000
As soon as all parts are found the DEC file is empty.
As long as an empty DEC file is present no more parts for this
filename will be decoded.
This allows decoding of multiparts in several steps (even next
day).
If someone wants to start decoding of all parts again then he has to remove the temporary file and the DEC file and start the decoder again.
Jürgen Helbing - 10.June 2002
Aucun commentaire:
Enregistrer un commentaire