summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/zip.cr14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/zip.cr b/src/zip.cr
index aa9006d..1dd666f 100644
--- a/src/zip.cr
+++ b/src/zip.cr
@@ -1257,8 +1257,20 @@ module Zip
# close data memory io
data_mem_io.close
+ end
- nil
+ #
+ # Return the uncompressed size of this entry in bytes.
+ #
+ # Example:
+ #
+ # Zip.read("foo.zip") do |zip|
+ # size = zip["bar.txt"].size
+ # puts "bar.txt is #{size} bytes."
+ # end
+ #
+ def size : UInt32
+ @uncompressed_size
end
# :nodoc: