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