definitely a good idea to run routine ^%GSIZE  to find the big consumers and packing

directory: c:\intersystems\cache\mgr\user\
Page: 1                           GLOBAL SIZE                        08 Aug 2017
                                                                        10:28 AM
      Global        Blocks       Bytes Used  Packing   Contig.
      --------    --------  ---------------  -------   -------
      CacheStd           1              140      2 %         0
      CacheStdS          1               92      1 %         0
      CacheStream      109          764.376     86 %        70
      ERRORS             1               12      0 %         0
      G1                 1               72      1 %         0

My personal preference is %Status: 1 = OK,
0 = something went wrong + standard or handmade Error Code
+ ability of $system.Status.Append(Status) to get a chain of error messages
which gives you the chance to drill down to the source. Which is especially important when
you get it from some embedded action.

The opposite to me is
<ZSOAP>  that leave you alone with no hint what went wrong
or the famous <ZSG> homed in %Save() Method

to pass return value I prefer objects or variables passed byRef od Output
 
The other opposite is SQLCODE (would be better named SQLerror)  0 is OK. Anything else needs action
But that's tradition in SQL world since more than half a century

Thanks for the pointer!
Good to see that someone got the time to productize the idea of Custom Index Type
With this development the win could have been even more dramatic.

My benchmark was done in  March2011,  so Caché version must have been 2010 .  
2013.1 was my last version @ISC  just rolling out.
At that time bitmaps helped only with rather relaxed precision.

For an engineer this sounds like a quite challenging exercise to rewrite a PGP lib in COS.
 

But it seems more promising to wrap the existing (and hopefully well tested) code and consume it from Caché using one of the existing Gateways:

- Callout Gateway http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

- ActiveX Gateway  http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

- or just  connect
over TCP/IP http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
or UDP http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
or a Pipe  http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

I bet the community has even more ideas to reuse the existing code

to me this looks like your content had an extra $C(13,10) at the end.
It could help to  have the full content at hands. 
eg:
before  content.OutputToDevice()
set ck=content.Read()
set ^ck($i(^ck))=ck
do content.Rewind()

I expect  zwrite ^ck will show more than 3  lines
That would indicate that the source of trouble is on the input side. 
Some closing action ?