Loading tools/aapt2/io/File.h +5 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,11 @@ class IFile { IFile* CreateFileSegment(size_t offset, size_t len); /** Returns whether the file was compressed before it was stored in memory. */ virtual bool WasCompressed() { return false; } private: // Any segments created from this IFile need to be owned by this IFile, so // keep them Loading tools/aapt2/io/ZipArchive.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,10 @@ std::unique_ptr<IData> ZipFile::OpenAsData() { const Source& ZipFile::GetSource() const { return source_; } bool ZipFile::WasCompressed() { return zip_entry_.method != kCompressStored; } ZipFileCollectionIterator::ZipFileCollectionIterator( ZipFileCollection* collection) : current_(collection->files_.begin()), end_(collection->files_.end()) {} Loading tools/aapt2/io/ZipArchive.h +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ class ZipFile : public IFile { std::unique_ptr<IData> OpenAsData() override; const Source& GetSource() const override; bool WasCompressed() override; private: ZipArchiveHandle zip_handle_; Loading Loading
tools/aapt2/io/File.h +5 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,11 @@ class IFile { IFile* CreateFileSegment(size_t offset, size_t len); /** Returns whether the file was compressed before it was stored in memory. */ virtual bool WasCompressed() { return false; } private: // Any segments created from this IFile need to be owned by this IFile, so // keep them Loading
tools/aapt2/io/ZipArchive.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,10 @@ std::unique_ptr<IData> ZipFile::OpenAsData() { const Source& ZipFile::GetSource() const { return source_; } bool ZipFile::WasCompressed() { return zip_entry_.method != kCompressStored; } ZipFileCollectionIterator::ZipFileCollectionIterator( ZipFileCollection* collection) : current_(collection->files_.begin()), end_(collection->files_.end()) {} Loading
tools/aapt2/io/ZipArchive.h +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ class ZipFile : public IFile { std::unique_ptr<IData> OpenAsData() override; const Source& GetSource() const override; bool WasCompressed() override; private: ZipArchiveHandle zip_handle_; Loading