Future<List<int>> peekBytes(int num) async { while (_currentList.length < num && !closed) { _currentList.addAll(await _stream.single); } return _currentList.take(num).toList(); }