1yencode(n)           Text encoding & decoding binary data           yencode(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       yencode - Y-encode/decode binary data
9

SYNOPSIS

11       package require Tcl  8.2
12
13       package require yencode  ?1.1.2?
14
15       ::yencode::encode string
16
17       ::yencode::decode string
18
19       ::yencode::yencode  ?-name  string?  ?-line  integer?  ?-crc32 boolean?
20       (-file filename | ?--? string)
21
22       ::yencode::ydecode (-file filename | ?--? string)
23
24_________________________________________________________________
25

DESCRIPTION

27       This package provides a Tcl-only implementation of the yEnc file encod‐
28       ing.  This is a recently introduced method of encoding binary files for
29       transmission through Usenet. This encoding packs  binary  data  into  a
30       format that requires an 8-bit clean transmission layer but that escapes
31       characters   special   to   the    NNTP    posting    protocols.    See
32       http://www.yenc.org/ for details concerning the algorithm.
33
34       ::yencode::encode string
35              returns the yEnc encoded data.
36
37       ::yencode::decode string
38              Decodes the given yEnc encoded data.
39
40       ::yencode::yencode  ?-name  string?  ?-line  integer?  ?-crc32 boolean?
41       (-file filename | ?--? string)
42              Encode a file or block of data.
43
44       ::yencode::ydecode (-file filename | ?--? string)
45              Decode a file or block of data. A file may contain more than one
46              embedded  file  so  the result is a list where each element is a
47              three element list of filename, file size and data.
48

OPTIONS

50       -filename name
51              Cause the yencode or ydecode commands to read  their  data  from
52              the named file rather that taking a string parameter.
53
54       -name string
55              The encoded data header line contains the suggested file name to
56              be used when unpacking the data. Use this option to change  this
57              from the default of "data.dat".
58
59       -line integer
60              The  yencoded  data header line contains records the line length
61              used during the encoding. Use  this  option  to  select  a  line
62              length  other  that the default of 128. Note that NNTP imposes a
63              1000 character line length limit  and  some  gateways  may  have
64              trouble with more than 255 characters per line.
65
66       -crc32 boolean
67              The  yEnc  specification  recommends  the  inclusion of a cyclic
68              redundancy check value in the footer. Use this option to  change
69              the default from true to false.
70
71       % set d [yencode::yencode -file testfile.txt]
72       =ybegin line=128 size=584 name=testfile.txt
73        -o- data not shown -o-
74       =yend size=584 crc32=ded29f4f
75
76

REFERENCES

78       [1]    http://www.yenc.org/yenc-draft.1.3.txt
79

BUGS, IDEAS, FEEDBACK

81       This  document,  and the package it describes, will undoubtedly contain
82       bugs and other problems.  Please report such in the category base64  of
83       the          Tcllib         SF         Trackers         [http://source
84       forge.net/tracker/?group_id=12883].  Please also report any  ideas  for
85       enhancements you may have for either package and/or documentation.
86

KEYWORDS

88       encoding, yEnc, ydecode, yencode
89
91       Copyright (c) 2002, Pat Thoyts
92
93
94
95
96base64                               1.1.2                          yencode(n)
Impressum