Age | Commit message (Collapse) | Author |
|
Optimize the case where we are appending to the end of the binary, use
binary syntax to create binaries with room for expansion in the next
loop, instead of using iolist_to_binary which creates a binary of the
exact size and needs to be copied in each loop.
Also remove support the unused Acc as iolists.
|
|
|
|
* erlang/pr/745:
Typofix: piecemeal
|
|
|
|
A warning for an unmatched return was introduced in aaa7c917.
The caller of openzip_close/1 ignores the return value, which
could be an error tuple. In this situation, handling a fatal
error, it is OK to ignore the return value; thus, we only need
to make it explicit that we are ignoring the return value.
|
|
These are not intended to be treated as processes by consumers, and the
type specs for the related functions have been updated accordingly.
|
|
The case was discovered where a parent process would exit before closing
the zip file. The result was that a port would be left open
indefinitely, as the small zip server would not detect this condition.
By comparison, the file module will close the associated port when the
parent exits for any reason. This change would make the zip module more
consistent with the semantics of similar modules.
This change is breaking for any callers expecting to pass the handle to
another process for processing (assuming it exits).
|
|
escript:create/2 accepts a 3-elements tuple containing files and
zip:create/3 options to build a zip file.
Also had to update zip typespecs to allow referral from escript docs.
|
|
|
|
|
|
|
|
|
|
zip:zip_open/1,2 did not accept binary archives.
Also corrected the contracts of t/1 and tt/1.
|
|
The contracts of zip:zip_list_dir/1 and zip:zip_get/2 have been
corrected.
|
|
|
|
This is the public interface of prim_zip:open/3,
which has been used in earlier releases by both
erl_prim_loader and escript. The new function
can be used as a replacement for the undocumented
function escript:foldl/3 that is likely to be
removed without further notice.
The error handling of prim_zip:open/3 (and
prim_zip:foldl/3) has been improved in order to
better suite a public interface. For example it
could happen that a file or a zlib port could be
left open in some errors cases.
The documentation of the FileSpec parameter to
zip:create/3 has been updated to show that
file info can be explicitly specified. A FileSpec
may contain {Filename, binary(), #file_info{}}
elements. The function zip:create/3 was already
prepared to partly support this, but now after
a few minor fixes it is fully supported.
|
|
|
|
|