Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Create your own custom (Un)Zip archiver with GUI

Project
Source of custom archiver with GUI

Dependencies
https://github.com/TheBarret/HeaderKit

[Image: I7fKyG7.png]

Bare bone features
  • Pack and Unpack using GZip

  • Header integrity check (Using the Header project)



How does it work?

I simply started to make a base class called 'entity' then on top of it i defined my file or directory classes that would hold
info about the item it harbors, such as ID, type ,checksum and creation date.
These entities are build in a tree structure and hold a parent property, this way we can search recursively.

Find/Locate and Extract methods:

Search by generated unique id, returns true if results are found
(Match can be wildcard pattern *abc*)
Code
Public Function FindByGuid(match As String, ByRef result As List(Of Entity)) As Boolean

Search by filename, returns true if results are found
(Match can be wildcard pattern *abc*)
Code
Public Function FindByName(match As String, ByRef result As List(Of Entity)) As Boolean

The resolver is a more direct approach to locate an entity, returns true if a result has been found
Code
Public Function TryResolve(path As String, ByRef result As Entity) As Boolean

Each entity has its own extractTo function, you can extract all or just a single entity,
keep in mind that the extractor expects the same folder output if a single entity is extracted.
Code
Public Function ExtractTo(Directory As String, Optional Overwrite As Boolean = False) As Boolean

Entity properties

Base properties
Code
Public ReadOnly Property Name As String
Public ReadOnly Property Guid As String
Public ReadOnly Property Created As DateTime
Public ReadOnly Property Type As EntityType
Public ReadOnly Property Path As String

Directory properties
Code
Public ReadOnly Property Parent As Entity
Public Property Content As List(Of Entity)

File entity properties
Code
Public ReadOnly Property Content As Byte()
Public ReadOnly Property Parent As Entity
Public ReadOnly Property Checksum As UInt32

Github link: https://github.com/TheBarret/Archiver

Notice that the github project is subject to get updates or/and changes
Another awesome release, good demonstration of your header lib. Good stuff. Keep it up!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by SicknessNov 2, 2020 07:08 PM 5 535 Nov 2, 2020 07:08 PM
Last Post: JoshuaSmith
[C#] by MintoJul 19, 2018 07:25 PM 10 691 Jul 19, 2018 07:25 PM
Last Post: 6577657534735
[.NET] by Johan CruyffSep 27, 2017 09:07 AM 0 166 Sep 27, 2017 09:07 AM
Last Post: Johan Cruyff