xref: /freebsd/contrib/file/magic/Magdir/uuencode (revision a4d6d3b8910f3805eebcd8703e11e066aad2e2a1)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*a4d6d3b8SXin LI# $File: uuencode,v 1.9 2021/11/13 17:48:10 christos Exp $
4b6cee71dSXin LI# uuencode:  file(1) magic for ASCII-encoded files
5b6cee71dSXin LI#
6b6cee71dSXin LI
7*a4d6d3b8SXin LI# The first line of xxencoded files is identical to that in uuencoded files,
8*a4d6d3b8SXin LI# but the first character in most subsequent lines is 'h' instead of 'M'.
9*a4d6d3b8SXin LI# (xxencoding uses lowercase letters in place of most of uuencode's
10*a4d6d3b8SXin LI# punctuation and survives BITNET gateways better.)
11*a4d6d3b8SXin LI0		regex/1024	\^begin\040[0-7]{3}\040
12*a4d6d3b8SXin LI>&0		regex/256	[\012\015]+M[\040-\140]{60}[\012\015]+				uuencoded text
13*a4d6d3b8SXin LI>&0		regex/256	[\012\015]+h[0-9A-Za-z\053\055]{60}[\012\015]+		xxencoded text
14*a4d6d3b8SXin LI>&0		default		x													uuencoded or xxencoded text
15*a4d6d3b8SXin LI>&0		string		>\0													\b, file name "%s"
16b6cee71dSXin LI
17b6cee71dSXin LI# btoa(1) is an alternative to uuencode that requires less space.
18b6cee71dSXin LI0	search/1	xbtoa\ Begin	btoa'd text
19b6cee71dSXin LI
20b6cee71dSXin LI# ship(1) is another, much cooler alternative to uuencode.
21b6cee71dSXin LI# Greg Roelofs, newt@uchicago.edu
22b6cee71dSXin LI0	search/1	$\012ship	ship'd binary text
23b6cee71dSXin LI
24b6cee71dSXin LI# bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
25b6cee71dSXin LI# Greg Roelofs, newt@uchicago.edu
26b6cee71dSXin LI0	search/1	Decode\ the\ following\ with\ bdeco	bencoded News text
27b6cee71dSXin LI
28b6cee71dSXin LI# GRR: handle BASE64
29