ManagedBass.ZipStream 0.2.2

dotnet add package ManagedBass.ZipStream --version 0.2.2
NuGet\Install-Package ManagedBass.ZipStream -Version 0.2.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ManagedBass.ZipStream" Version="0.2.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ManagedBass.ZipStream --version 0.2.2
#r "nuget: ManagedBass.ZipStream, 0.2.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ManagedBass.ZipStream as a Cake Addin
#addin nuget:?package=ManagedBass.ZipStream&version=0.2.2

// Install ManagedBass.ZipStream as a Cake Tool
#tool nuget:?package=ManagedBass.ZipStream&version=0.2.2

BASS_ZIPSTREAM

A BASS plugin which creates a stream from an archive entry.

bass.dll is required for native projects. ManagedBass is required for .NET projects.

A simple example;

var sourceChannel = BassZipStream.CreateStream("Music.zip", 0); //Create a stream for the first file in Music.zip.

Bass.ChannelPlay(sourceChannel);

while (Bass.ChannelIsActive(sourceChannel) == PlaybackState.Playing)
{
    Thread.Sleep(1000);
}

Bass.StreamFree(sourceChannel);

Some archive reading framework is provided;

var archive = default(IntPtr);
Archive.Create(out archive);
Archive.Open(archive, "Music.zip");

var count = default(int);
Archive.GetEntryCount(archive, out count)
for (var a = 0; a < count; a++)
{
    var entry = default(Archive.ArchiveEntry);
    Archive.GetEntry(archive, out entry, index)
    Console.WriteLine("Path: {0}, Size: {1}", entry.path, entry.size);
}

Archive.Release(archive);

Extract an entry;

var entry = default(IntPtr);
ArchiveEntry.OpenEntry("Music.zip", index, out entry);

var buffer = new byte[10240];
do
{
    var count = ArchiveEntry.ReadEntry(entry, buffer, buffer.Length);
    if (count <= 0)
    {
        break;
    }
    //Do something with the data in buffer.
} while (true);

ArchiveEntry.CloseEntry(entry);

Password protected archives can be used, register the handler;

Archive.GetPassword(GetPassword);

public static bool GetPassword(ref Archive.ArchivePassword password)
{
    password = PromptUserForPassword(password.path);
}
Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.0

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.2 1,043 7/3/2022
0.2.1 376 7/3/2022
0.2.0 398 7/2/2022