Version 1.0
Easy way to split and join data using custom chunks
no
import easyiter as e
e.info_packet = True #Makes the first item in sequece the number of chunks, Useful for sending data over sockets.
e.packet_size = 1 #Specifies how large each chunk should be
result = e.create_from_string("Hello world") # Create chunk
print(result) #See what it looks like
print(e.join_from_string(result)) #See it joined
Creates and returns a packet from a string
data must be a string, or have the __str__
attribute that must return a string
Creates and returns a packet from a bytes
data must be bytes
Creates and returns a packet from a string
data must be string
When info_packet is True
it ignores the first packet (which contains the total amount of blocks)
returns string
Creates and returns a packet from a bytes
data must be bytes
When info_packet is True
it ignores the first packet (which contains the total amount of blocks)
returns bytes
info_packet
(bool):
When set:True
Makes the first item in sequece the number of chunks, Useful for sending data over sockets.
packet_size
(bool):
When set:True
Makes the first item in sequece the number of chunks, Useful for sending data over sockets.