Pakettic

Latest version: v1.3.1

Safety actively analyzes 622940 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.3.1

Fixed

- Parentheses are not needed when indexing calls e.g. `(a()).foo` can be
`a().foo`
- Parentheses are needed in string literal method calls e.g. in `("abc"):sub(2)`
- Parse error when `--{` looks like subtraction followed negated table
constant

1.3.0

Added

- Option `--data-to-code` (or just `-d`) that puts the data in
hexadecimal strings in the code and adds a small stub to load the data
in the string at right address
- Option `--no-load` to disable using the load trick altogether.
`load''` is not entirely semantically identical to `function()end`, as
the `load''` cannot access local variables in the outer scope.
However, this is such a rare occurrence that only disable it when
absolutely necessary.

Changed

- Parse errors report the offending line more accurately

Fixed

- Printing function calls with a single table or string parameter
- Local variables without immediate assignment crashed the parser
- The initial minification used reserved keywords (in particular: `or`)
- Handling carts with multiple CODE chunks
- Variable names that started with `or` or `and` could give an parse
error; for example, in `x=1 orange=2` the first statement was parsed
as `x=1 or ange`, followed by `=1` which gave the parse error.
- Escaping `\r` and `\f` in quoted string literals
- `-- {` was not considered comment, even though it was not considered
permutation block either
- Add space between a numeral and following period when printing. For
example, `1 ..2` (string concatenation) should not be printed as
`1..2`, as LUA then parses the beginning of it as floating point
numeral `1.`

1.2.0

Added

- Perform initial variable minification before starting optimization
- Constant folding: constant integer expressions are evaluated by
pakettic, in case they compresses better
- More detailed reporting of the crunching results

Fixed

- Spaces between tokens were not always printed even when needed
- Hex numbers with fractional digits had the fractional digits printed in reverse
- Hex numbers with an exponent raised an error when printed

Changed

- The default compression level is now -z0; our benchmarking does not
show significant advantage over -z2 (only 0.2% over the test corpus),
yet it's almost 3 times slower. Use -z2 and higher only when you are
desperate and absolutely need that last byte.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.