docs: def read(self, cnt=None):
          """Read all or specified amount of data from archive entry."""
  
          # sanitize cnt
          if cnt is None or cnt < 0:
              cnt = self._remain
          elif cnt > self._remain:
              cnt = self._remain
          if cnt == 0:
              return EMPTY
  
          # actual read
          data = self._read(cnt)
          if data:
              self._md_context.update(data)
              self._remain -= len(data)
          if len(data) != cnt:
              raise BadRarFile("Failed the read enough data")
  
          # done?
          if not data or self._remain == 0:
              # self.close()
              self._check()
          return data