Skip to content

Commit

Permalink
Merge pull request #54 from BuzonIO/alpha2
Browse files Browse the repository at this point in the history
Alpha2
  • Loading branch information
sandes committed May 17, 2020
2 parents 8b6508e + 7d074cf commit 570618e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 4 deletions.
14 changes: 14 additions & 0 deletions examples/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@

storesize = 92896201 # (jupiter.mp4 + mercury.mp4) size in bytes

"""
# You can get the file size in python with:
storesize = 0
for path in paths:
# (jupiter.mp4 + mercury.mp4) size in bytes
f = open(path['fs'], 'rb')
storesize += os.fstat(f.fileno()).st_size
"""


# constructor
zfly = zipfly.ZipFly( mode='w', paths=paths, storesize=storesize )

Expand Down
15 changes: 15 additions & 0 deletions examples/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,23 @@
},
]


storesize = 92896201 # (jupiter.mp4 + mercury.mp4) size in bytes

"""
# You can get the file size in python with:
storesize = 0
for path in paths:
# (jupiter.mp4 + mercury.mp4) size in bytes
f = open(path['fs'], 'rb')
storesize += os.fstat(f.fileno()).st_size
"""


# constructor
zfly = zipfly.ZipFly( mode='w', paths=paths, storesize=storesize )

Expand Down
3 changes: 1 addition & 2 deletions examples/one_file_response.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import zipfly

# Efficient way to read a single very large binary file in python

file_location = '/home/user/Documents/file-100-GB.csv'

# Efficient way to read a single very large binary file in python
go_to_streaming = zipfly.from_one_file( file_location )

print ( go_to_streaming )
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
url='http://github.com/buzonIO/zipfly',
download_url = 'https://github.com/BuzonIO/zipfly/archive/v2.1.1.tar.gz',
author='Buzon',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author_email='support@buzon.io',
keywords=['zipfly','buzon'],
install_requires=[],
Expand Down
2 changes: 1 addition & 1 deletion zipfly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""
from __future__ import unicode_literals, print_function, with_statement

__version__ = 'a2.1.1'
__version__ = '2.1.1'
__author__ = 'Santiago Debus - Grow HQ, Inc.'
__license__ = 'MIT'

Expand Down
2 changes: 1 addition & 1 deletion zipfly/zipfly.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def buffer_prediction_size(self):

# initial values
_len = len( self.paths )
_len_utf8 = int( 0x2 ) * _len
_len_utf8 = int( 0x2 ) * _len # magic number

# Empty zip size in bytes
# zip initial size for multiple files
Expand Down

0 comments on commit 570618e

Please sign in to comment.