'M      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe/9;<=?LHandled styles of Tar archive.&Scan a lazy ByteString for file magic.None !"/9;<=?LM Remove tmp on run success? Remove tmp on run error? Share directory across runs? Stream for env text. Stream for run text.  Data text.       None/9;<=?LValid shell variable names consist of a leading letter or underscore and then any number of letters, underscores or digits.4Valid shell string values contain any byte but null. !"#$%&'  !  !  !"#$%&'None/9;<=?L0A chunk describes a block of binary data ready for inclusion in a shell script. For many data blocks, no encoding or decoding is necessary; these are stored in a 1=. Those blocks needing byte-translation are stored in an 2.3 Converts a  into a string safe for inclusion in a shell HERE document and annotates with information to construct a shell decoder for that document, if necessary.A  with nulls is rewritten in a complicated way. Two escape characters are chosen from a class of ASCII printable characters that look like reasonable escape characters; the two that show up least frequently in the document (including 0 times) become the null replacer and the escaper. All instances of these two characters are rewritten to escape sequences formed with the escaper, while nulls are rewritten to the null replacer. Given the two characters thus chosen, a command line with tr and sed7 in sequence can be constructed to decode the document.This encoding doubles the amount of space consumed by the escape characters. In the worst case, where the data is made of all 20 potential escapes, evenly distributed, and one null (so we can't punt on escaping), the data will grow in size by 10 percent. For data that is more evenly distributed over the bytes -- as we might expect of compressed tarballs -- we expect a size growth of two 256ths, or less than 0.8 percent.4*Given a byte to replace nulls and an escape byte, rewrites the data such that nulls are mapped to the replace byte, replace bytes are mapped to a pair of escape bytes and the escape byte is is mapped to an escape byte followed by an underscore. For example, if the null replace byte is ! and the escape byte is # then all nulls become !, any ! become ## and all # become #_.This escaping scheme is dictated by the needs of our Sed decoder, which is just two global substitions, one after another. If the escaping were such that, with our characters above, # escaped to ## and ! to #_ , then #_ in the input becomes ##_). We want to run the subsitution for ## first, to catch this; it produces #_V; then Sed feeds the input to the second substitution which unfortunately renders !4. In the alternate scheme, the input is encoded #__, the !1 decoder runs first and ignores it, then the # decoder runs and catches it. When using a pipeline of stream processors to interpret escape sequences, it seems best to ensure that only the very last processor inserts escape characters, to prevent their further interpretation.5Given the byte used to replace nulls and the escape byte, undoes the result of the encode operation -- rewriting null replacers to literal nulls and escape patterns to the original bytes. This function is not intended to be used in practice -- it will be shell commands that unpack the data -- but serves to document the ideas behind decoding as well as offering a way to check the encoder.6NThe candidate escape characters, with the forms to be used in constructed tr and sed commands.7IMany binary strings can be embedded as-is in a HEREDOC, without escaping.8[Predicate to determine whether data is represented as an encoded chunk or is unencoded. ./0123456789: ./0123456789 012:345./6789 ./0123456789:None/9;<=?L=A = program archives streams to produce a script that unpacks the file data in a temporary location and runs the command with the attached environment information in that location. The command may be any executable file contents, modulo architectural compatibility. It is written along side the temporary work location, to ensure it does not collide with any files in the archive. The two boolean flags determine when to delete the temporary directory. The first flag determines whether or not to delete successful (exit code zero) runs; the second determines whether or not to delete failed (exit code non-zero) runs.?An ?T program processes byte streams with the specified chunking to produce a script.A7ARX subprograms process some input to produce a script.=>?@ABCD=>?@ABAB?@D=>C=>?@ABCDSafe /9;<=?LTE9Non-overlapping classes of command line argument strings.FAn F has the form  shellvar name= string. For example, SENDIN=the_clowns.GA G! is a file path starting with /, ./, or ../.HA H is a string of two dashes, --@, commonly used to indicate the end of options processing.IA II is a string beginning with two dashes and then at least one non-dash.JA J is a single dash, -*, commonly used to indicate input from stdin or output to stdout.KA K> is a beginning with a dash and then at least one non-dash.LA LX is a scheme, separated from the resource, represented as an arbitrary string, by ://z. The scheme consists of ASCII, lower-case letters and digits, and may be multi-part, with each part separated by a + or / (for example, git+ssh). An example URL:  http://example.com/?q=special.MA MP is a sequence of hexadecimal digits, upper or lower case, beginning with 0x; for example: 0x01a3.NA N# is a string of decimal digits: 123123.OA ON is a decimal number followed by a multiplicative suffix, in the manner of dd or head0. Note that counts in terms of bytes require B (unlike dd or head'). For a full list of suffixes, see \ below.PDetermine if a particular  matches the given E of token.QDetermine if a particular  matches any E of token.R3A ByteString stand-in that demoes each token class.SThe recognizer appropriate to each token class. Parses successfully if a the token class is recognized, returning '()'. Most token types are defined in terms of a prefix of the input -- for example, Gb -- and the parsers for these tokens naturally return as soon as the prefix is recognized.\WA map from suffixes to sizes, following the conventions of command line tools (GNU dd or headW and many others) as well as the standard for binary sizes established by the IEC.  B = 1 K = KiB = 1024B kB = 1000B M = MiB = 1024K MB = 1000kB G = GiB = 1024M GB = 1000MB T = TiB = 1024G TB = 1000GB P = PiB = 1024T PB = 1000TB E = EiB = 1024P EB = 1000PB Z = ZiB = 1024E ZB = 1000EB Y = YiB = 1024Z YB = 1000ZB ]0Parse a size, consuming the entire input string.^gParse a size, consuming the entire input string, with the final result bounded by the maximum of a  type.EFGHIJKLMNOPQRSTUVWXYZ[\]^EOFGHIJKLMNPQRSTUVWXYZ[\]^EFGHIJKLMNOPQRSTUVWXYZ[\]^E FGHIJKLMNOPQRSTUVWXYZ[\]^None/9;<=?Lc-A source of bytes (no writing, only reading).fUA byte-oriented store that can be read from or written to in a streaming fashion.bcdefghijklmnopqrstuvwxyzbcdefghijklmnopqrstuvwxyzijklmnopqrsfghcdebtuvwxyzbcdefghijklmnopqrstuvwxyzx4 None/9;<=?L !=>?@ABAB?@=> !None/9;<=?L/Run CLI tool, processing arguments and options..Apply defaulting and overrides appropriate to ? programs..Apply defaulting and overrides appropriate to = programs.By default, we encode binary data to HERE docs 4MiB at a time. (The encoded result may be up to 10% larger, though 1% is more likely.)$The default task is a no-op call to  /bin/true.     !"#$%&'()*+,-./01234566789:;<=>?@ABCDDEEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijjklmnopqrstuvwxyz{|}~%&i arx-0.2.3-1bnjIcPrmcx1z5rDVNtmMoSystem.Posix.ARX.TarSystem.Posix.ARX.TMPXToolsSystem.Posix.ARX.ShSystem.Posix.ARX.HEREDatSystem.Posix.ARX.ProgramsSystem.Posix.ARX.CLI.CLTokensSystem.Posix.ARX.CLI.OptionsSystem.Posix.ARX.CLISystem.Posix.ARXTarTARTGZTBZmagicbzMagicgzMagictarMagic $fShowTar$fOrdTar$fEqTarTemplaterm0rm1sharedenvrundatrender findChunkscoalesce markHolesisHole$fShowTemplateRawrawRenderVarValsetEUvalvar $fRender[] $fRender[]0$fRawVar $fRenderVar$fRawVal $fRenderVal $fShowVar$fOrdVar$fEqVar $fShowVal$fOrdVal$fEqVal EscapeCharChunk SafeChunk EncodedChunkchunkencodedecodeescapessafeForHereDocencodedscript$fIsStringChunk$fShowEscapeChar $fShowChunkTMPXSHDATARX interpret $fARXTMPX[]$fARXSHDATByteStringClass EnvBinding QualifiedPathDashDash LongOptionDash ShortOptionURLHexNum DecimalNumSizematch recognizeexemplar recognizerschemeSeparatorvarFirstvarBodyisLongOptionCharisShortOptionChar isSchemeChar isHexDigitisURLSchemeCharsizessize sizeBounded $fShowClass $fOrdClass $fEqClass ArgsParser ByteSource ByteStringIOStreamSTDIOPathshdattmpx blockSize outputFileioStreamqPathrm scriptToRuncmdsatisfyanyArgargargPrim<@>tokCLslashes$fShowByteSource$fOrdByteSource$fEqByteSource$fShowIOStream $fOrdIOStream $fEqIOStreamZOMZeroOneManymain shdatResolveshdatCheckStreams tmpxResolvetmpxCheckStreamstmpxOpenopenByteSource inIOStream outIOStream arIOStream defaultBlock defaultTaskstreamsMessage blockMessageerrdie $fMonoidZOMbytestring-0.10.8.1Data.ByteString.InternalbaseGHC.EnumBounded