Commits

Anonymous committed 0cb60fd

Added a simple bit array class for general sharing.

  • Participants
  • Parent commits e422b19

Comments (0)

Files changed (7)

File Remount/Remount.xcodeproj/bgulanowski.pbxuser

 					PBXFileDataSource_Warnings_ColumnID,
 				);
 			};
-			PBXPerProjectTemplateStateSaveDate = 248484012;
-			PBXWorkspaceStateSaveDate = 248484012;
+			PBXPerProjectTemplateStateSaveDate = 272994794;
+			PBXWorkspaceStateSaveDate = 272994794;
 		};
 		perUserProjectItems = {
-			4E1873E00EC7321700FA426D = 4E1873E00EC7321700FA426D /* PBXTextBookmark */;
-			4E1873E10EC7323400FA426D = 4E1873E10EC7323400FA426D /* PBXTextBookmark */;
-			4E1873E20EC7323400FA426D = 4E1873E20EC7323400FA426D /* PBXTextBookmark */;
-			4E1873EB0EC7325300FA426D = 4E1873EB0EC7325300FA426D /* PBXTextBookmark */;
-			4E1873EC0EC7326300FA426D = 4E1873EC0EC7326300FA426D /* PBXTextBookmark */;
-			4E1873F00EC735B900FA426D = 4E1873F00EC735B900FA426D /* PBXTextBookmark */;
-			4E1873F10EC735B900FA426D = 4E1873F10EC735B900FA426D /* PBXTextBookmark */;
-			4E1873F20EC735B900FA426D = 4E1873F20EC735B900FA426D /* PBXTextBookmark */;
-			4E1873F30EC735D100FA426D = 4E1873F30EC735D100FA426D /* PBXTextBookmark */;
-			4E1873F50EC735E700FA426D = 4E1873F50EC735E700FA426D /* PBXTextBookmark */;
-			4E1873F60EC735E700FA426D = 4E1873F60EC735E700FA426D /* PBXTextBookmark */;
-			4E1873F70EC735FC00FA426D = 4E1873F70EC735FC00FA426D /* PBXTextBookmark */;
-			4E1873F80EC7367500FA426D = 4E1873F80EC7367500FA426D /* PBXTextBookmark */;
-			4E5561CA0ECF90B600BC62D5 /* PBXTextBookmark */ = 4E5561CA0ECF90B600BC62D5 /* PBXTextBookmark */;
-			4E5561CB0ECF90C400BC62D5 /* PBXTextBookmark */ = 4E5561CB0ECF90C400BC62D5 /* PBXTextBookmark */;
-			4E5561CC0ECF90C400BC62D5 /* PBXTextBookmark */ = 4E5561CC0ECF90C400BC62D5 /* PBXTextBookmark */;
-			4E5561D50ECF90E000BC62D5 /* PBXTextBookmark */ = 4E5561D50ECF90E000BC62D5 /* PBXTextBookmark */;
-			4E5561D60ECF90EB00BC62D5 /* PBXTextBookmark */ = 4E5561D60ECF90EB00BC62D5 /* PBXTextBookmark */;
-			4E5561D70ECF90EB00BC62D5 /* PBXBookmark */ = 4E5561D70ECF90EB00BC62D5 /* PBXBookmark */;
-			4E5561D80ECF90EB00BC62D5 /* PBXTextBookmark */ = 4E5561D80ECF90EB00BC62D5 /* PBXTextBookmark */;
-			4E5561D90ECF90EB00BC62D5 /* PBXBookmark */ = 4E5561D90ECF90EB00BC62D5 /* PBXBookmark */;
+			4E424112104591EC006E806D /* PBXTextBookmark */ = 4E424112104591EC006E806D /* PBXTextBookmark */;
+			4E42412A1045926D006E806D /* PBXTextBookmark */ = 4E42412A1045926D006E806D /* PBXTextBookmark */;
 			4E5561DF0ECF916000BC62D5 /* PBXBookmark */ = 4E5561DF0ECF916000BC62D5 /* PBXBookmark */;
 			4E5561E00ECF916000BC62D5 /* PBXBookmark */ = 4E5561E00ECF916000BC62D5 /* PBXBookmark */;
-			4E5561E10ECF916000BC62D5 /* PBXTextBookmark */ = 4E5561E10ECF916000BC62D5 /* PBXTextBookmark */;
-			4E5561E20ECF916000BC62D5 /* PBXBookmark */ = 4E5561E20ECF916000BC62D5 /* PBXBookmark */;
-			4E5561E30ECF916000BC62D5 /* PBXBookmark */ = 4E5561E30ECF916000BC62D5 /* PBXBookmark */;
-			4E5561E40ECF916000BC62D5 /* PBXTextBookmark */ = 4E5561E40ECF916000BC62D5 /* PBXTextBookmark */;
-			4E5561E50ECF916000BC62D5 /* PBXTextBookmark */ = 4E5561E50ECF916000BC62D5 /* PBXTextBookmark */;
-			4E5561E80ECF916D00BC62D5 /* PBXTextBookmark */ = 4E5561E80ECF916D00BC62D5 /* PBXTextBookmark */;
-			4E5561EC0ECF917600BC62D5 /* PBXTextBookmark */ = 4E5561EC0ECF917600BC62D5 /* PBXTextBookmark */;
-			4E5561ED0ECF917600BC62D5 /* PBXTextBookmark */ = 4E5561ED0ECF917600BC62D5 /* PBXTextBookmark */;
-			4E5561EE0ECF918500BC62D5 /* PBXTextBookmark */ = 4E5561EE0ECF918500BC62D5 /* PBXTextBookmark */;
-			4E5561F10ECF919500BC62D5 /* PBXTextBookmark */ = 4E5561F10ECF919500BC62D5 /* PBXTextBookmark */;
-			4E5561F20ECF919600BC62D5 /* PBXTextBookmark */ = 4E5561F20ECF919600BC62D5 /* PBXTextBookmark */;
-			4E5561F50ECF91A100BC62D5 /* PBXTextBookmark */ = 4E5561F50ECF91A100BC62D5 /* PBXTextBookmark */;
-			4E5561F70ECF91E500BC62D5 /* PBXTextBookmark */ = 4E5561F70ECF91E500BC62D5 /* PBXTextBookmark */;
-			4E5561F80ECF91E500BC62D5 /* PBXTextBookmark */ = 4E5561F80ECF91E500BC62D5 /* PBXTextBookmark */;
-			4E5561F90ECF921D00BC62D5 /* PBXTextBookmark */ = 4E5561F90ECF921D00BC62D5 /* PBXTextBookmark */;
-			4E5561FA0ECF922100BC62D5 /* PBXTextBookmark */ = 4E5561FA0ECF922100BC62D5 /* PBXTextBookmark */;
-			4E5561FE0ECF92A200BC62D5 /* PBXTextBookmark */ = 4E5561FE0ECF92A200BC62D5 /* PBXTextBookmark */;
-			4E5561FF0ECF92AC00BC62D5 /* PBXTextBookmark */ = 4E5561FF0ECF92AC00BC62D5 /* PBXTextBookmark */;
-			4E5562070ECF92E500BC62D5 /* PBXTextBookmark */ = 4E5562070ECF92E500BC62D5 /* PBXTextBookmark */;
 			4E55620A0ECF935D00BC62D5 /* PBXTextBookmark */ = 4E55620A0ECF935D00BC62D5 /* PBXTextBookmark */;
-			4E55620C0ECF935D00BC62D5 /* PBXTextBookmark */ = 4E55620C0ECF935D00BC62D5 /* PBXTextBookmark */;
-			4E55620D0ECF935D00BC62D5 /* PBXTextBookmark */ = 4E55620D0ECF935D00BC62D5 /* PBXTextBookmark */;
-			4E55620F0ECF935D00BC62D5 /* PBXTextBookmark */ = 4E55620F0ECF935D00BC62D5 /* PBXTextBookmark */;
-			4E5562110ECF936A00BC62D5 /* PBXTextBookmark */ = 4E5562110ECF936A00BC62D5 /* PBXTextBookmark */;
-			4E5562130ECF93F400BC62D5 /* PBXTextBookmark */ = 4E5562130ECF93F400BC62D5 /* PBXTextBookmark */;
-			4E5562140ECF93F400BC62D5 /* PBXTextBookmark */ = 4E5562140ECF93F400BC62D5 /* PBXTextBookmark */;
-			4EA341DE0EBBCFCB0011137D = 4EA341DE0EBBCFCB0011137D /* PBXTextBookmark */;
-			4EDD3B480EBDCE1000F7D1E6 = 4EDD3B480EBDCE1000F7D1E6 /* PBXTextBookmark */;
-			4EDD3BF40EBDEAAD00F7D1E6 = 4EDD3BF40EBDEAAD00F7D1E6 /* PBXTextBookmark */;
-			4EDD3C450EBDF18400F7D1E6 = 4EDD3C450EBDF18400F7D1E6 /* PBXTextBookmark */;
-			4EDD3C4C0EBDF81400F7D1E6 = 4EDD3C4C0EBDF81400F7D1E6 /* PBXTextBookmark */;
-			4EDD3C670EBDF9A600F7D1E6 = 4EDD3C670EBDF9A600F7D1E6 /* PBXTextBookmark */;
-			4EDD3CF10EBE189200F7D1E6 = 4EDD3CF10EBE189200F7D1E6 /* PBXTextBookmark */;
-			4EDD3CF20EBE189200F7D1E6 = 4EDD3CF20EBE189200F7D1E6 /* PBXTextBookmark */;
-			4EDD3CF30EBE189200F7D1E6 = 4EDD3CF30EBE189200F7D1E6 /* PBXTextBookmark */;
-			4EDD3CF50EBE189200F7D1E6 = 4EDD3CF50EBE189200F7D1E6 /* PBXTextBookmark */;
-			4EDD3CF60EBE189200F7D1E6 = 4EDD3CF60EBE189200F7D1E6 /* PBXTextBookmark */;
-			4EDD3D090EBE4E7300F7D1E6 = 4EDD3D090EBE4E7300F7D1E6 /* PBXTextBookmark */;
-			4EDD3D670EBE5E5C00F7D1E6 = 4EDD3D670EBE5E5C00F7D1E6 /* PBXTextBookmark */;
-			4EDD3D6C0EBF4CEE00F7D1E6 = 4EDD3D6C0EBF4CEE00F7D1E6 /* PBXTextBookmark */;
+			4EA341DE0EBBCFCB0011137D /* PBXTextBookmark */ = 4EA341DE0EBBCFCB0011137D /* PBXTextBookmark */;
+			4EDD3B480EBDCE1000F7D1E6 /* PBXTextBookmark */ = 4EDD3B480EBDCE1000F7D1E6 /* PBXTextBookmark */;
+			4EDD3C670EBDF9A600F7D1E6 /* PBXTextBookmark */ = 4EDD3C670EBDF9A600F7D1E6 /* PBXTextBookmark */;
+			4EDD3CF10EBE189200F7D1E6 /* PBXTextBookmark */ = 4EDD3CF10EBE189200F7D1E6 /* PBXTextBookmark */;
+			4EDD3CF20EBE189200F7D1E6 /* PBXTextBookmark */ = 4EDD3CF20EBE189200F7D1E6 /* PBXTextBookmark */;
+			4EDD3CF30EBE189200F7D1E6 /* PBXTextBookmark */ = 4EDD3CF30EBE189200F7D1E6 /* PBXTextBookmark */;
 		};
 		sourceControlManager = 4E92FF050EBA1B9100F6B5D1 /* Source Control */;
 		userBuildSettings = {
 		};
 	};
-	4E1873E00EC7321700FA426D /* PBXTextBookmark */ = {
+	4E424112104591EC006E806D /* PBXTextBookmark */ = {
 		isa = PBXTextBookmark;
 		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
+		name = "Remount.m: 208";
 		rLen = 0;
-		rLoc = 9922;
+		rLoc = 6903;
 		rType = 0;
-		vrLen = 1410;
-		vrLoc = 8488;
+		vrLen = 1625;
+		vrLoc = 6033;
 	};
-	4E1873E10EC7323400FA426D /* PBXTextBookmark */ = {
+	4E42412A1045926D006E806D /* PBXTextBookmark */ = {
 		isa = PBXTextBookmark;
 		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
+		name = "Remount.m: 208";
 		rLen = 0;
-		rLoc = 9922;
+		rLoc = 6903;
 		rType = 0;
-		vrLen = 1306;
-		vrLoc = 8569;
-	};
-	4E1873E20EC7323400FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
-		rLen = 0;
-		rLoc = 9922;
-		rType = 0;
-		vrLen = 1306;
-		vrLoc = 8569;
-	};
-	4E1873EB0EC7325300FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
-		rLen = 0;
-		rLoc = 9922;
-		rType = 0;
-		vrLen = 528;
-		vrLoc = 9343;
-	};
-	4E1873EC0EC7326300FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
-		rLen = 0;
-		rLoc = 9922;
-		rType = 0;
-		vrLen = 1258;
-		vrLoc = 8897;
-	};
-	4E1873F00EC735B900FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
-		rLen = 0;
-		rLoc = 9922;
-		rType = 0;
-		vrLen = 1258;
-		vrLoc = 8897;
-	};
-	4E1873F10EC735B900FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
-		rLen = 0;
-		rLoc = 9922;
-		rType = 0;
-		vrLen = 1251;
-		vrLoc = 8897;
-	};
-	4E1873F20EC735B900FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
-		rLen = 0;
-		rLoc = 9922;
-		rType = 0;
-		vrLen = 1217;
-		vrLoc = 8931;
-	};
-	4E1873F30EC735D100FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 281";
-		rLen = 0;
-		rLoc = 9922;
-		rType = 0;
-		vrLen = 523;
-		vrLoc = 9343;
-	};
-	4E1873F50EC735E700FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1273;
-		vrLoc = 8897;
-	};
-	4E1873F60EC735E700FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1278;
-		vrLoc = 8772;
-	};
-	4E1873F70EC735FC00FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 545;
-		vrLoc = 9343;
-	};
-	4E1873F80EC7367500FA426D /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1750;
-		vrLoc = 6724;
-	};
-	4E5561CA0ECF90B600BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1748;
-		vrLoc = 6726;
-	};
-	4E5561CB0ECF90C400BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1643;
-		vrLoc = 6726;
-	};
-	4E5561CC0ECF90C400BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1643;
-		vrLoc = 6726;
-	};
-	4E5561D50ECF90E000BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 551;
-		vrLoc = 7818;
-	};
-	4E5561D60ECF90EB00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1748;
-		vrLoc = 6726;
-	};
-	4E5561D70ECF90EB00BC62D5 /* PBXBookmark */ = {
-		isa = PBXBookmark;
-		fRef = 4EA341F10EBBD0A30011137D /* EjectMenu.pdf */;
-	};
-	4E5561D80ECF90EB00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1748;
-		vrLoc = 6726;
-	};
-	4E5561D90ECF90EB00BC62D5 /* PBXBookmark */ = {
-		isa = PBXBookmark;
-		fRef = 4EA341F10EBBD0A30011137D /* EjectMenu.pdf */;
+		vrLen = 1094;
+		vrLoc = 6033;
 	};
 	4E5561DF0ECF916000BC62D5 /* PBXBookmark */ = {
 		isa = PBXBookmark;
 		isa = PBXBookmark;
 		fRef = 4E5561DC0ECF913B00BC62D5 /* EjectStatus.pdf */;
 	};
-	4E5561E10ECF916000BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 277";
-		rLen = 0;
-		rLoc = 9751;
-		rType = 0;
-		vrLen = 1748;
-		vrLoc = 6726;
-	};
-	4E5561E20ECF916000BC62D5 /* PBXBookmark */ = {
-		isa = PBXBookmark;
-		fRef = 4EA341F10EBBD0A30011137D /* EjectMenu.pdf */;
-	};
-	4E5561E30ECF916000BC62D5 /* PBXBookmark */ = {
-		isa = PBXBookmark;
-		fRef = 4E5561DC0ECF913B00BC62D5 /* EjectStatus.pdf */;
-	};
-	4E5561E40ECF916000BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1591;
-		vrLoc = 8192;
-	};
-	4E5561E50ECF916000BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1360;
-		vrLoc = 8893;
-	};
-	4E5561E80ECF916D00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 705;
-		vrLoc = 8192;
-	};
-	4E5561EC0ECF917600BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1501;
-		vrLoc = 7818;
-	};
-	4E5561ED0ECF917600BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1407;
-		vrLoc = 7818;
-	};
-	4E5561EE0ECF918500BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 705;
-		vrLoc = 8192;
-	};
-	4E5561F10ECF919500BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1407;
-		vrLoc = 7818;
-	};
-	4E5561F20ECF919600BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1407;
-		vrLoc = 7818;
-	};
-	4E5561F50ECF91A100BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 705;
-		vrLoc = 8192;
-	};
-	4E5561F70ECF91E500BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1343;
-		vrLoc = 8778;
-	};
-	4E5561F80ECF91E500BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1226;
-		vrLoc = 8895;
-	};
-	4E5561F90ECF921D00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 569;
-		vrLoc = 8778;
-	};
-	4E5561FA0ECF922100BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 279";
-		rLen = 0;
-		rLoc = 9810;
-		rType = 0;
-		vrLen = 1551;
-		vrLoc = 7845;
-	};
-	4E5561FE0ECF92A200BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 92";
-		rLen = 0;
-		rLoc = 2543;
-		rType = 0;
-		vrLen = 2238;
-		vrLoc = 1541;
-	};
-	4E5561FF0ECF92AC00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 92";
-		rLen = 0;
-		rLoc = 2543;
-		rType = 0;
-		vrLen = 2294;
-		vrLoc = 1480;
-	};
 	4E5562040ECF92D100BC62D5 /* Remount.m:106 */ = {
 		isa = PBXFileBreakpoint;
 		actions = (
 		lineNumber = 106;
 		location = Remount;
 		modificationTime = 248484562.348796;
+		originalNumberOfMultipleMatches = 0;
 		state = 1;
 	};
-	4E5562070ECF92E500BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 92";
-		rLen = 0;
-		rLoc = 2543;
-		rType = 0;
-		vrLen = 2294;
-		vrLoc = 1480;
-	};
 	4E55620A0ECF935D00BC62D5 /* PBXTextBookmark */ = {
 		isa = PBXTextBookmark;
 		fRef = 4E55620B0ECF935D00BC62D5 /* DADisk.h */;
 	};
 	4E55620B0ECF935D00BC62D5 /* DADisk.h */ = {
 		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
 		name = DADisk.h;
 		path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/DiskArbitration.framework/Versions/A/Headers/DADisk.h;
 		sourceTree = "<absolute>";
 	};
-	4E55620C0ECF935D00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 102";
-		rLen = 36;
-		rLoc = 3227;
-		rType = 0;
-		vrLen = 825;
-		vrLoc = 2762;
-	};
-	4E55620D0ECF935D00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4E55620E0ECF935D00BC62D5 /* DADisk.h */;
-		name = "DADisk.h: 56";
-		rLen = 30;
-		rLoc = 2886;
-		rType = 0;
-		vrLen = 1377;
-		vrLoc = 1915;
-	};
-	4E55620E0ECF935D00BC62D5 /* DADisk.h */ = {
-		isa = PBXFileReference;
-		name = DADisk.h;
-		path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/DiskArbitration.framework/Versions/A/Headers/DADisk.h;
-		sourceTree = "<absolute>";
-	};
-	4E55620F0ECF935D00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 104";
-		rLen = 0;
-		rLoc = 3082;
-		rType = 0;
-		vrLen = 765;
-		vrLoc = 2762;
-	};
-	4E5562110ECF936A00BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 104";
-		rLen = 0;
-		rLoc = 3082;
-		rType = 0;
-		vrLen = 2116;
-		vrLoc = 1478;
-	};
-	4E5562130ECF93F400BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		rLen = 1;
-		rLoc = 202;
-		rType = 1;
-	};
-	4E5562140ECF93F400BC62D5 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 208";
-		rLen = 0;
-		rLoc = 6903;
-		rType = 0;
-		vrLen = 1760;
-		vrLoc = 5898;
-	};
 	4E92FEFB0EBA1B8B00F6B5D1 /* Remount */ = {
 		isa = PBXExecutable;
 		activeArgIndices = (
 		argumentStrings = (
 		);
 		autoAttachOnCrash = 1;
-		breakpointsEnabled = 1;
+		breakpointsEnabled = 0;
 		configStateDict = {
 		};
 		customDataFormattersEnabled = 1;
+		dataTipCustomDataFormattersEnabled = 1;
+		dataTipShowTypeColumn = 1;
+		dataTipSortType = 0;
 		debuggerPlugin = GDBDebugging;
 		disassemblyDisplayState = 0;
 		dylibVariantSuffix = "";
 		name = Remount;
 		savedGlobals = {
 		};
+		showTypeColumn = 0;
 		sourceDirectories = (
 		);
 		variableFormatDictionary = {
 		fallbackIsa = XCSourceControlManager;
 		isSCMEnabled = 0;
 		scmConfiguration = {
+			repositoryNamesForRoots = {
+				"" = "";
+			};
 		};
 	};
 	4E92FF060EBA1B9100F6B5D1 /* Code sense */ = {
 	};
 	4EA341880EBBC8F80011137D /* Remount.m */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {1172, 5908}}";
+			sepNavIntBoundsRect = "{{0, 0}, {1172, 6315}}";
 			sepNavSelRange = "{6903, 0}";
-			sepNavVisRange = "{5898, 1760}";
+			sepNavVisRange = "{6033, 1094}";
 		};
 	};
 	4EA341DE0EBBCFCB0011137D /* PBXTextBookmark */ = {
 		path = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Files.h;
 		sourceTree = "<absolute>";
 	};
-	4EDD3B520EBDCE1000F7D1E6 /* DADisk.h */ = {
-		isa = PBXFileReference;
-		lastKnownFileType = sourcecode.c.h;
-		name = DADisk.h;
-		path = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/DiskArbitration.framework/Versions/A/Headers/DADisk.h;
-		sourceTree = "<absolute>";
-	};
-	4EDD3BF40EBDEAAD00F7D1E6 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EDD3BF50EBDEAAD00F7D1E6 /* NSAttributedString.h */;
-		name = "NSAttributedString.h: 8";
-		rLen = 81;
-		rLoc = 156;
-		rType = 0;
-		vrLen = 1652;
-		vrLoc = 0;
-	};
-	4EDD3BF50EBDEAAD00F7D1E6 /* NSAttributedString.h */ = {
-		isa = PBXFileReference;
-		lastKnownFileType = sourcecode.c.h;
-		name = NSAttributedString.h;
-		path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSAttributedString.h;
-		sourceTree = "<absolute>";
-	};
-	4EDD3C450EBDF18400F7D1E6 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 198";
-		rLen = 0;
-		rLoc = 6734;
-		rType = 0;
-		vrLen = 697;
-		vrLoc = 6347;
-	};
-	4EDD3C4C0EBDF81400F7D1E6 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EDD3B520EBDCE1000F7D1E6 /* DADisk.h */;
-		name = "DADisk.h: 129";
-		rLen = 34;
-		rLoc = 6067;
-		rType = 0;
-		vrLen = 1915;
-		vrLoc = 5128;
-	};
 	4EDD3C670EBDF9A600F7D1E6 /* PBXTextBookmark */ = {
 		isa = PBXTextBookmark;
 		fRef = 4EA342990EBC96EB0011137D /* IconsCore.h */;
 		vrLen = 1002;
 		vrLoc = 147;
 	};
-	4EDD3CF50EBE189200F7D1E6 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341870EBBC8F80011137D /* Remount.h */;
-		name = "Remount.h: 21";
-		rLen = 0;
-		rLoc = 356;
-		rType = 0;
-		vrLen = 782;
-		vrLoc = 0;
-	};
-	4EDD3CF60EBE189200F7D1E6 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EF2857D0EBCE751006780E7 /* NSString+RMAdds.m */;
-		name = "NSString+RMAdds.m: 14";
-		rLen = 15;
-		rLoc = 231;
-		rType = 0;
-		vrLen = 1002;
-		vrLoc = 147;
-	};
-	4EDD3D090EBE4E7300F7D1E6 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EDD3B520EBDCE1000F7D1E6 /* DADisk.h */;
-		name = "DADisk.h: 129";
-		rLen = 34;
-		rLoc = 6067;
-		rType = 0;
-		vrLen = 512;
-		vrLoc = 5596;
-	};
-	4EDD3D670EBE5E5C00F7D1E6 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 212";
-		rLen = 0;
-		rLoc = 7432;
-		rType = 0;
-		vrLen = 510;
-		vrLoc = 6496;
-	};
-	4EDD3D6C0EBF4CEE00F7D1E6 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 4EA341880EBBC8F80011137D /* Remount.m */;
-		name = "Remount.m: 384";
-		rLen = 0;
-		rLoc = 13077;
-		rType = 0;
-		vrLen = 1640;
-		vrLoc = 11844;
-	};
 	4EF2857C0EBCE751006780E7 /* NSString+RMAdds.h */ = {
 		uiCtxt = {
 			sepNavIntBoundsRect = "{{0, 0}, {1172, 626}}";

File Remount/Remount.xcodeproj/bgulanowski.perspectivev3

 <plist version="1.0">
 <dict>
 	<key>ActivePerspectiveName</key>
-	<string>Project</string>
+	<string>Debug</string>
 	<key>AllowedModules</key>
 	<array>
 		<dict>
 				<string>active-combo-popup</string>
 				<string>action</string>
 				<string>NSToolbarFlexibleSpaceItem</string>
-				<string>buildOrClean</string>
-				<string>build-and-goOrGo</string>
+				<string>debugger-enable-breakpoints</string>
+				<string>build-and-go</string>
+				<string>com.apple.ide.PBXToolbarStopButton</string>
+				<string>get-info</string>
 				<string>NSToolbarFlexibleSpaceItem</string>
-				<string>servicesModuleRefactoring</string>
-				<string>show-inspector</string>
 				<string>com.apple.pbx.toolbar.searchfield</string>
 			</array>
 			<key>ControllerClassBaseName</key>
 						<array>
 							<string>1C37FBAC04509CD000000102</string>
 							<string>1C37FAAC04509CD000000102</string>
-							<string>1C08E77C0454961000C914BD</string>
 							<string>1C37FABC05509CD000000102</string>
 							<string>1C37FABC05539CD112110102</string>
 							<string>E2644B35053B69B200211256</string>
 							<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
 							<array>
 								<array>
-									<integer>2</integer>
-									<integer>0</integer>
+									<integer>21</integer>
+									<integer>20</integer>
 								</array>
 							</array>
 							<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
 							<string>MainColumn</string>
 							<real>185</real>
 						</array>
-						<key>RubberWindowFrame</key>
-						<string>31 176 1440 828 0 0 1680 1028 </string>
 					</dict>
 					<key>Module</key>
 					<string>PBXSmartGroupTreeModule</string>
 										<key>_historyCapacity</key>
 										<integer>10</integer>
 										<key>bookmark</key>
-										<string>4E5562140ECF93F400BC62D5</string>
+										<string>4E42412A1045926D006E806D</string>
 										<key>history</key>
 										<array>
 											<string>4EDD3C670EBDF9A600F7D1E6</string>
 											<string>4E5561DF0ECF916000BC62D5</string>
 											<string>4E5561E00ECF916000BC62D5</string>
 											<string>4E55620A0ECF935D00BC62D5</string>
-											<string>4E5562130ECF93F400BC62D5</string>
-										</array>
-										<key>nextStack</key>
-										<array>
-											<string>4EDD3CF60EBE189200F7D1E6</string>
-											<string>4E55620D0ECF935D00BC62D5</string>
-										</array>
-										<key>prevStack</key>
-										<array>
-											<string>4EDD3CF50EBE189200F7D1E6</string>
-											<string>4EDD3C450EBDF18400F7D1E6</string>
-											<string>4E5561D80ECF90EB00BC62D5</string>
-											<string>4E5561E20ECF916000BC62D5</string>
-											<string>4E5561E30ECF916000BC62D5</string>
+											<string>4E424112104591EC006E806D</string>
 										</array>
 									</dict>
 									<key>SplitCount</key>
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 0}, {1233, 640}}</string>
-								<key>RubberWindowFrame</key>
-								<string>31 176 1440 828 0 0 1680 1028 </string>
+								<string>{{0, 0}, {1233, 479}}</string>
 							</dict>
 							<key>Module</key>
 							<string>PBXNavigatorGroup</string>
 							<key>Proportion</key>
-							<string>640pt</string>
+							<string>479pt</string>
 						</dict>
 						<dict>
 							<key>Proportion</key>
-							<string>142pt</string>
+							<string>303pt</string>
 							<key>Tabs</key>
 							<array>
 								<dict>
 									<key>GeometryConfiguration</key>
 									<dict>
 										<key>Frame</key>
-										<string>{{10, 27}, {1233, 115}}</string>
+										<string>{{10, 27}, {1233, 276}}</string>
 									</dict>
 									<key>Module</key>
 									<string>XCDetailModule</string>
 									<string>PBXCVSModule</string>
 								</dict>
 								<dict>
-									<key>BecomeActive</key>
-									<true/>
 									<key>ContentConfiguration</key>
 									<dict>
 										<key>PBXProjectModuleGUID</key>
 										<string>XCMainBuildResultsModuleGUID</string>
 										<key>PBXProjectModuleLabel</key>
-										<string>Build</string>
+										<string>Build Results</string>
 										<key>XCBuildResultsTrigger_Collapse</key>
-										<integer>1024</integer>
+										<integer>1021</integer>
 										<key>XCBuildResultsTrigger_Open</key>
 										<integer>1010</integer>
 									</dict>
 									<key>GeometryConfiguration</key>
 									<dict>
 										<key>Frame</key>
-										<string>{{10, 27}, {1233, 115}}</string>
-										<key>RubberWindowFrame</key>
-										<string>31 176 1440 828 0 0 1680 1028 </string>
+										<string>{{10, 27}, {1233, 276}}</string>
 									</dict>
 									<key>Module</key>
 									<string>PBXBuildResultsModule</string>
 			</array>
 			<key>TableOfContents</key>
 			<array>
-				<string>4E5561CD0ECF90C400BC62D5</string>
+				<string>4E42411F10459226006E806D</string>
 				<string>1CA23ED40692098700951B8B</string>
-				<string>4E5561CE0ECF90C400BC62D5</string>
+				<string>4E42412010459226006E806D</string>
 				<string>4E92FEFF0EBA1B9100F6B5D1</string>
-				<string>4E5561CF0ECF90C400BC62D5</string>
+				<string>4E42412110459226006E806D</string>
 				<string>1CA23EDF0692099D00951B8B</string>
 				<string>1CA23EE00692099D00951B8B</string>
 				<string>1CA23EE10692099D00951B8B</string>
 				<string>XCMainBuildResultsModuleGUID</string>
 			</array>
+			<key>ToolbarConfigUserDefaultsMinorVersion</key>
+			<string>2</string>
 			<key>ToolbarConfiguration</key>
 			<string>xcode.toolbar.config.defaultV3</string>
 		</dict>
 			<array>
 				<string>XCToolbarPerspectiveControl</string>
 				<string>NSToolbarSeparatorItem</string>
-				<string>active-target-popup</string>
+				<string>active-combo-popup</string>
+				<string>NSToolbarFlexibleSpaceItem</string>
+				<string>debugger-enable-breakpoints</string>
 				<string>build-and-go</string>
-				<string>go-run</string>
-				<string>go-debug</string>
-				<string>NSToolbarFlexibleSpaceItem</string>
-				<string>debugger-fix-and-continue</string>
+				<string>com.apple.ide.PBXToolbarStopButton</string>
 				<string>debugger-restart-executable</string>
 				<string>debugger-pause</string>
 				<string>debugger-step-over</string>
 				<string>debugger-step-into</string>
 				<string>debugger-step-out</string>
-				<string>debugger-step-instruction</string>
 				<string>NSToolbarFlexibleSpaceItem</string>
 				<string>servicesModulebreakpoints</string>
-				<string>com.apple.ide.XCBreakpointsToolbarItem</string>
+				<string>debugger-show-console-window</string>
+				<string>clear-log</string>
 			</array>
 			<key>ControllerClassBaseName</key>
 			<string>PBXDebugSessionModule</string>
 			<key>Layout</key>
 			<array>
 				<dict>
+					<key>BecomeActive</key>
+					<true/>
 					<key>ContentConfiguration</key>
 					<dict>
 						<key>PBXProjectModuleGUID</key>
 					<dict>
 						<key>Frame</key>
 						<string>{{0, 0}, {1440, 245}}</string>
+						<key>RubberWindowFrame</key>
+						<string>31 177 1440 828 0 0 1680 1028 </string>
 					</dict>
 					<key>Module</key>
 					<string>PBXDebugCLIModule</string>
 							</array>
 							<key>Frame</key>
 							<string>{{697, 0}, {743, 293}}</string>
+							<key>RubberWindowFrame</key>
+							<string>31 177 1440 828 0 0 1680 1028 </string>
 						</dict>
+						<key>RubberWindowFrame</key>
+						<string>31 177 1440 828 0 0 1680 1028 </string>
 					</dict>
 					<key>Module</key>
 					<string>PBXDebugSessionModule</string>
 			</array>
 			<key>TableOfContents</key>
 			<array>
-				<string>4E5561D00ECF90C400BC62D5</string>
+				<string>4E42412210459226006E806D</string>
 				<string>1CCC7628064C1048000F2A68</string>
 				<string>1CCC7629064C1048000F2A68</string>
-				<string>4E5561D10ECF90C400BC62D5</string>
-				<string>4E5561D20ECF90C400BC62D5</string>
-				<string>4E5561D30ECF90C400BC62D5</string>
-				<string>4E5561D40ECF90C400BC62D5</string>
+				<string>4E42412310459226006E806D</string>
+				<string>4E42412410459226006E806D</string>
+				<string>4E42412510459226006E806D</string>
+				<string>4E42412610459226006E806D</string>
 				<string>4E92FEFF0EBA1B9100F6B5D1</string>
 			</array>
+			<key>ToolbarConfigUserDefaultsMinorVersion</key>
+			<string>2</string>
 			<key>ToolbarConfiguration</key>
 			<string>xcode.toolbar.config.debugV3</string>
 		</dict>
 	<key>StatusbarIsVisible</key>
 	<true/>
 	<key>TimeStamp</key>
-	<real>248484852.50766999</real>
+	<real>272994925.31647301</real>
 	<key>ToolbarDisplayMode</key>
 	<integer>1</integer>
 	<key>ToolbarIsVisible</key>
 	<integer>5</integer>
 	<key>WindowOrderList</key>
 	<array>
-		<string>4E5562010ECF92AC00BC62D5</string>
-		<string>4E5562020ECF92AC00BC62D5</string>
-		<string>/Users/bgulanowski/Developer/My/bitbucket/boredastronaut/Remount/Remount.xcodeproj</string>
+		<string>4E42412810459226006E806D</string>
+		<string>4E42412910459226006E806D</string>
+		<string>/Users/bgulanowski/Dev/Proj/OSS/bitbucket/boredastronaut/Remount/Remount.xcodeproj</string>
 	</array>
 	<key>WindowString</key>
-	<string>31 176 1440 828 0 0 1680 1028 </string>
+	<string>31 177 1440 828 0 0 1680 1028 </string>
 	<key>WindowToolsV3</key>
 	<array>
 		<dict>

File Remount/Remount.xcodeproj/project.pbxproj

 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = Remount_Prefix.pch;
+				GCC_VERSION = 4.0;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
 				PRODUCT_NAME = Remount;
 				GCC_MODEL_TUNING = G5;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = Remount_Prefix.pch;
+				GCC_VERSION = 4.0;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
 				PRODUCT_NAME = Remount;

File classes/BABitArray.h

+//
+//  BABitArray.h
+//
+//  Created by Brent Gulanowski on 09-09-27.
+//  Copyright 2009 Bored Astronaut. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface BABitArray : NSObject {
+	unsigned char *buffer;
+	NSUInteger bufferLength; // in bytes, rounded up
+	NSUInteger length;       // in bits as initialized
+	NSUInteger count;        // number of set bits
+}
+
+@property (readonly) NSUInteger length;
+@property (readonly) NSUInteger count;
+
+- (BOOL)bit:(NSUInteger)index;
+- (void)setBit:(NSUInteger)index;
+- (void)setRange:(NSRange)range;
+- (void)setAll;
+- (void)clearBit:(NSUInteger)index;
+- (void)clearRange:(NSRange)range;
+- (void)clearAll;
+
+- (BOOL)checkCount;
+- (void)refreshCount;
+
++ (MRBitArray *)bitArrayWithLength:(NSUInteger)bits;
++ (MRBitArray *)bitArray8;
++ (MRBitArray *)bitArray64;
++ (MRBitArray *)bitArray512;
++ (MRBitArray *)bitArray4096; // 16^3, our zone volume
+
+@end

File classes/BABitArray.m

+//
+//  BABitArray.m
+//
+//  Created by Brent Gulanowski on 09-09-27.
+//  Copyright 2009 Bored Astronaut. All rights reserved.
+//
+
+#import "BABitArray.h"
+
+
+void setBits(unsigned char *byte, NSUInteger start, NSUInteger end, BOOL set);
+NSUInteger hammingWeight(unsigned char *bytes, NSRange range);
+NSUInteger setRange(unsigned char *bytes, NSRange range, BOOL set);
+
+
+@interface BABitArray ()
+
+- (id)initWithLength:(NSUInteger)bits;
+
+@property (readwrite) NSUInteger count;
+
+@end
+
+
+
+@implementation BABitArray
+
+@synthesize length, count;
+
+
+NSUInteger bitsInChar = NSNotFound;
+
++ (void)initialize {
+	if(NSNotFound == bitsInChar) {
+		bitsInChar = sizeof(char)*8;
+//		NSLog(@"bits in char: %u", bitsInChar);
+	}
+}
+
+- (id)init {
+	return [self initWithLength:0];
+}
+
+- (void)dealloc {
+	if (length > 0)
+		free(buffer);
+	[super dealloc];
+}
+
+- (NSString *)description {
+	return [NSString stringWithFormat:@"%@ length:%d count:%d", [super description], length, count];
+}
+
+- (BOOL)bit:(NSUInteger)index {
+	if(index > length)
+		[NSException raise:NSInvalidArgumentException format:@"index beyond bounds: %u", index];
+	
+	NSUInteger byte = index/bitsInChar;
+	NSUInteger bit = index%bitsInChar;
+	
+//	NSLog(@"Checking bit %u in byte %u (0x%02X): 0x%02X", bit, byte, buffer[byte], (buffer[byte] & (1 << bit)));
+	return (BOOL)((buffer[byte] & (1 << bit)) != 0);
+}
+
+- (void)setBit:(NSUInteger)index {
+	if(index > length)
+	[NSException raise:NSInvalidArgumentException format:@"index beyond bounds: %u", index];
+
+	NSUInteger byte = index/bitsInChar;
+	NSUInteger bit = index%bitsInChar;
+	unsigned char mask = (1 << bit);
+	
+	if(! (buffer[byte] & mask)) {
+		buffer[byte] |= mask;
+		++count;
+	}
+}
+
+- (void)setRange:(NSRange)range {
+	if(range.location+range.length >= length)
+		[NSException raise:NSInvalidArgumentException format:@"index beyond bounds: %u", index];
+	count += setRange(buffer, range, YES);
+}
+
+- (void)setAll {
+	memset(buffer, 0xff, bufferLength);
+	count = length;
+}
+
+- (void)clearBit:(NSUInteger)index {
+	if(index > length)
+		[NSException raise:NSInvalidArgumentException format:@"index beyond bounds: %u", index];
+	NSUInteger byte = index/bitsInChar;
+	NSUInteger bit = index%bitsInChar;
+	unsigned char mask = (1 << bit);
+	
+	if(buffer[byte] & mask) {
+		buffer[byte] &= ~mask;
+		--count;
+	}	
+}
+
+- (void)clearRange:(NSRange)range {
+	if(range.location+range.length >= length)
+		[NSException raise:NSInvalidArgumentException format:@"index beyond bounds: %u", index];
+	count -= setRange(buffer, range, NO);
+}
+
+- (void)clearAll {
+	memset(buffer, 0, bufferLength);
+	count = 0;
+}
+
+- (id)initWithLength:(NSUInteger)bits {
+	if(bits > 256*256*256)
+		[NSException raise:NSInvalidArgumentException format:@"Requested unreasonable length for bit array (%u)", bits];
+	self = [super init];
+	if(self) {
+		length = bits; // never changes
+		bufferLength = bits/bitsInChar + ((bits%bitsInChar) > 0 ? 1 : 0);
+		self.count = 0;
+		if(length > 0) {
+			buffer = calloc(bufferLength, sizeof(char));
+			if(NULL == buffer) {
+				[NSException raise:@"" format:@"Could not allocate memory; requested size: %@", bufferLength];
+			}
+//			NSLog(@"Allocated bit array; length: %u; buffer length: %u; buffer: %x", length, bufferLength, buffer);
+		}
+	}
+	return self;
+}
+
+- (BOOL)checkCount {
+	return hammingWeight(buffer, NSMakeRange(0, length)) == count;
+}
+
+- (void)refreshCount {
+	count = hammingWeight(buffer, NSMakeRange(0, length));
+}
+
++ (BABitArray *)bitArrayWithLength:(NSUInteger)bits {
+	return [[[self alloc] initWithLength:bits] autorelease];
+}
++ (BABitArray *)bitArray8 {
+	return [[[self alloc] initWithLength:8] autorelease];
+}
++ (BABitArray *)bitArray64 {
+	return [[[self alloc] initWithLength:64] autorelease];
+}
++ (BABitArray *)bitArray512 {
+	return [[[self alloc] initWithLength:512] autorelease];
+}
++ (BABitArray *)bitArray4096 {
+	return [[[self alloc] initWithLength:4096] autorelease];
+}
+
+@end
+
+
+void setBits(unsigned char *byte, NSUInteger start, NSUInteger end, BOOL set) {
+	for(NSUInteger i=start; i<=end; ++i)
+		if(set)
+			*byte |= (1 << i);
+		else
+			*byte &= ~(1 << i);	
+}
+
+// Algorithm found on the web
+NSUInteger hammingWeight(unsigned char *bytes, NSRange bitRange) {
+	
+	NSUInteger first = bitRange.location/bitsInChar;
+	NSUInteger last = (bitRange.location+bitRange.length-1)/bitsInChar;
+	NSUInteger start = bitRange.location%bitsInChar;
+	NSUInteger end = (start+bitRange.length-1)%bitsInChar;
+	
+	NSUInteger odd, even;
+	NSUInteger subtotal = 0, total = 0;
+	unsigned char firstMask = 0, lastMask = 0, mask=0xFF;
+	
+	if(0 == start)
+		firstMask = 0xFF;
+	else
+		setBits(&firstMask, start, 7, YES);
+//	NSLog(@"firstMask = 0x%02X (start %u)", firstMask, start);
+	
+	if(7 == end)
+		lastMask = 0xFF;
+	else
+		setBits(&lastMask, 0, end, YES);
+//	NSLog(@"lastMask = 0x%02X (end %u)", lastMask, end);
+	
+//	NSLog(@"Counting bits in %u bits", bitRange.length);
+	
+	for(NSUInteger i=first; i<=last; ++i) {
+		
+		if(first == i)
+			mask = firstMask;
+		else if(last == i)
+			mask = lastMask;
+		else
+			mask = 0xFF;
+		
+		odd  = (bytes[i] & mask)      & 0x55; // 0101 0101 = 0x40 + 0x10 + 0x04 + 0x01
+		even = (bytes[i] & mask) >> 1 & 0x55;
+		subtotal = odd + even;
+		odd  = subtotal      & 0x33; // 0011 0011 - 0x20 + 0x10 + 0x02 + 0x01
+		even = subtotal >> 2 & 0x33;
+		subtotal = odd + even;
+		odd  = subtotal      & 0x0F; // 0000 1111
+		even = subtotal >> 4 & 0x0F;
+		subtotal = odd + even;		
+		total += subtotal;
+		
+//		NSLog(@"subtotal for byte %u (0x%02X): %u; running total: %u", i, bytes[i], subtotal, total);
+	}
+	
+	return total;
+}
+
+NSUInteger setRange(unsigned char *bytes, NSRange range, BOOL set) {
+	
+	NSUInteger first = range.location/bitsInChar;
+	NSUInteger last = (range.location+range.length-1)/bitsInChar;
+	NSUInteger start = range.location%bitsInChar;
+	NSUInteger end = (start+range.length-1)%bitsInChar;
+	unsigned char byteSet = set ? 0xFF : 0;
+	
+	NSUInteger oldCount = hammingWeight(bytes, range);
+	
+//	NSLog(@"setRange(0x%08X, %@, %@): first %u; last %u; start %u; end %u; old count %u",
+//		  bytes, NSStringFromRange(range), set?@"YES":@"NO", first, last, start, end, oldCount);
+	
+	if (first == last) {
+		setBits(bytes+first, start, end, set);
+	}
+	else {
+		setBits(bytes+first, start, bitsInChar-1, set);
+		setBits(bytes+last, 0, end, set);		
+		if(last - first > 1)
+			memset(bytes+first+1, byteSet, last - first - 1);
+	}
+	
+	if(set)
+		return range.length - oldCount;
+	else
+		return oldCount;
+}

File classes/BABitArrayTest.h

+//
+//  BABitArrayTest.h
+//
+//  Created by Brent Gulanowski on 09-10-03.
+//  Copyright 2009 Bored Astronaut. All rights reserved.
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+#import "BABitArray.h"
+
+@interface BABitArrayTest : SenTestCase {
+
+}
+
+@end

File classes/BABitArrayTest.m

+//
+//  BABitArrayTest.m
+//
+//  Created by Brent Gulanowski on 09-10-03.
+//  Copyright 2009 Bored Astronaut. All rights reserved.
+//
+
+#import "BABitArrayTest.h"
+
+
+@implementation BABitArrayTest
+
+- (void)test1 {
+	
+	BABitArray *ba = [BABitArray bitArray8];
+
+	STAssertNotNil(ba, @"Failed to allocate bit array 8");
+
+	[ba setAll];
+
+	STAssertTrue([ba bit:0], @"Failed to set bit 0");
+	STAssertTrue([ba bit:7], @"Failed to set bit 7");
+}
+
+- (void)test2 {
+	
+	BABitArray *ba = [BABitArray bitArray64];
+	NSUInteger count = 0;
+	
+	STAssertNotNil(ba, @"Failed to allocate bit array 64");
+	STAssertTrue([ba checkCount], @"Failed count check (%u)", ba.count);
+
+	[ba setAll];
+	STAssertTrue([ba bit:0], @"Failed to set bit 0");
+	STAssertTrue([ba bit:63], @"Failed to set bit 63");
+	STAssertTrue([ba checkCount], @"Failed count check (%u)", ba.count);
+	
+	[ba clearAll];
+	STAssertFalse([ba bit:0], @"Failed to clear bit 0");
+	STAssertFalse([ba bit:63], @"Failed to clear bit 63");
+	STAssertTrue([ba checkCount], @"Failed count check (%u)", ba.count);
+	
+	[ba setBit:33];
+	++count;
+	STAssertTrue([ba bit:33], @"Failed to set bit 33");
+	STAssertEquals(ba.count, count, @"Wrong count (%u; expected %u)", ba.count, count);
+	STAssertTrue([ba checkCount], @"Failed count check (%u)", ba.count);
+
+	NSRange range = NSMakeRange(40, 15);
+	[ba setRange:range];
+	count+=15;
+
+	STAssertTrue([ba bit:40], @"Failed to set bit 40 when setting range %@", NSStringFromRange(range));
+	STAssertEquals(ba.count, count, @"Wrong count (%u; expected %u)", ba.count, count);
+	STAssertTrue([ba checkCount], @"Failed count check (%u)", ba.count);
+
+	range = NSMakeRange(7, 10);
+	[ba setRange:range];
+	count+=10;
+	STAssertTrue([ba bit:7], @"Failed to set bit 7 when setting range %@", NSStringFromRange(range));
+	STAssertTrue([ba bit:12], @"Failed to set bit 12 when setting range %@", NSStringFromRange(range));
+	STAssertTrue([ba bit:16], @"Failed to set bit 16 when setting range %@", NSStringFromRange(range));
+	STAssertEquals(ba.count, count, @"Wrong count (%u; expected %u)", ba.count, count);
+	STAssertTrue([ba checkCount], @"Failed count check (expected: %u)", ba.count);
+	
+	[ba setRange:NSMakeRange(20, 17)];
+	count+=(17-1); // 33 is already set
+	STAssertEquals(ba.count, count, @"Wrong count (%u; expected %u)", ba.count, count);
+	STAssertTrue([ba checkCount], @"Failed count check (%u)", ba.count);
+
+	[ba clearRange:NSMakeRange(28, 4)];
+	count-=4;
+	STAssertTrue([ba bit:20], @"Failed to set bit 20");
+	STAssertFalse([ba bit:30], @"Failed to clear bit 30");
+	STAssertTrue([ba bit:35], @"Failed to set bit 35");
+	STAssertEquals(ba.count, count, @"Wrong count (%u; expected %u)", ba.count, count);
+	STAssertTrue([ba checkCount], @"Failed count check (%u)", ba.count);
+
+}
+
+@end