Skip to content

Instantly share code, notes, and snippets.

View andrewgleave's full-sized avatar

Andrew Gleave andrewgleave

View GitHub Profile
package main
import (
"fmt"
"log"
"net/http"
"html/template"
"github.com/gorilla/sessions"
@davepeck
davepeck / using_libarchive.m
Created February 1, 2011 17:20
How to use libarchive to unextract on iOS
/* call processNextArchiveEntry in some kind of loop! */
- (int)processNextArchiveEntry:(struct archive *)archive
{
struct archive_entry *entry = NULL;
int result = ARCHIVE_OK;
result = archive_read_next_header(archive, &entry);
if (result == ARCHIVE_OK)
{