Skip to content

Commit

Permalink
Drop addtional_streaminfo
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Jun 29, 2020
1 parent f67a864 commit bd93ff2
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions py7zr/archiveinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,13 +815,10 @@ def write(self, file: BinaryIO):
class Header:
""" the archive header """

__slot__ = ['solid', 'properties', 'additional_streams', 'main_streams', 'files_info',
'size', '_start_pos']
__slot__ = ['solid', 'main_streams', 'files_info', 'size', '_start_pos']

def __init__(self) -> None:
self.solid = False
self.properties = None
self.additional_streams = None
self.main_streams = None
self.files_info = None
self.size = 0 # fixme. Not implemented yet
Expand Down Expand Up @@ -918,17 +915,10 @@ def write(self, file: BinaryIO, afterheader: int, encoded=True, encrypted=False)
startpos = self._encode_header(file, afterheader, filters)
else:
write_byte(file, Property.HEADER)
# Archive properties
if self.main_streams is not None:
self.main_streams.write(file)
# Files Info
if self.files_info is not None:
self.files_info.write(file)
if self.properties is not None:
self.properties.write(file)
# AdditionalStreams
if self.additional_streams is not None:
self.additional_streams.write(file)
write_byte(file, Property.END)
endpos = file.tell()
header_len = endpos - startpos
Expand All @@ -939,9 +929,6 @@ def write(self, file: BinaryIO, afterheader: int, encoded=True, encrypted=False)

def _extract_header_info(self, fp: BinaryIO) -> None:
pid = fp.read(1)
if pid == Property.ADDITIONAL_STREAMS_INFO:
self.additional_streams = StreamsInfo.retrieve(fp)
pid = fp.read(1)
if pid == Property.MAIN_STREAMS_INFO:
self.main_streams = StreamsInfo.retrieve(fp)
pid = fp.read(1)
Expand Down

0 comments on commit bd93ff2

Please sign in to comment.