forked from rikyoz/bit7z
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitarchivewriter.cpp
42 lines (34 loc) · 1.89 KB
/
bitarchivewriter.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* bit7z - A C++ static library to interface with the 7-zip shared libraries.
* Copyright (c) 2014-2023 Riccardo Ostani - All Rights Reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include "bitarchivewriter.hpp"
#include "internal/fs.hpp"
namespace bit7z {
BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib, const BitInOutFormat& format )
: BitAbstractArchiveCreator( lib, format ), BitOutputArchive( *this, tstring{} ) {}
BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib,
const tstring& inArchive,
const BitInOutFormat& format,
const tstring& password )
: BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ),
BitOutputArchive( *this, inArchive ) {}
BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib,
const std::vector< byte_t >& inArchive,
const BitInOutFormat& format,
const tstring& password )
: BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ),
BitOutputArchive( *this, inArchive ) {}
BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib,
std::istream& inArchive,
const BitInOutFormat& format,
const tstring& password )
: BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ),
BitOutputArchive( *this, inArchive ) {}
} // namespace bit7z