Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F628826
GitPack.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
GitPack.h
View Options
#ifndef GITPACK_H
#define GITPACK_H
#include
<QIODevice>
#include
<cstdint>
#include
"Git.h"
struct
GitPackIdxItem
;
class
GitPack
{
public
:
struct
Info
{
Git
::
Object
::
Type
type
=
Git
::
Object
::
Type
::
UNKNOWN
;
size_t
expanded_size
=
0
;
uint64_t
offset
=
0
;
QString
ref_id
;
uint32_t
checksum
=
0
;
};
struct
Object
:
public
Info
{
QByteArray
content
;
size_t
packed_size
=
0
;
};
private
:
static
uint32_t
read_uint32_be
(
const
void
*
p
)
{
auto
const
*
q
=
(
uint8_t
const
*
)
p
;
return
(
q
[
0
]
<<
24
)
|
(
q
[
1
]
<<
16
)
|
(
q
[
2
]
<<
8
)
|
q
[
3
];
}
public
:
static
bool
decompress
(
QIODevice
*
in
,
size_t
expanded_size
,
QByteArray
*
out
,
size_t
*
consumed
=
nullptr
,
uint32_t
*
crc
=
nullptr
);
static
bool
load
(
QIODevice
*
file
,
GitPackIdxItem
const
*
item
,
Object
*
out
);
static
bool
load
(
QString
const
&
packfile
,
GitPackIdxItem
const
*
item
,
Object
*
out
);
static
bool
seekPackedObject
(
QIODevice
*
file
,
GitPackIdxItem
const
*
item
,
Info
*
out
);
static
void
decodeTree
(
QByteArray
*
out
);
static
Git
::
Object
::
Type
stripHeader
(
QByteArray
*
out
);
};
#endif
// GITPACK_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 5:10 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
140105
Default Alt Text
GitPack.h (1 KB)
Attached To
Mode
R77 Guitar
Attached
Detach File
Event Timeline